[英]How to install Django in a virtual environment Python (Windows 7) from a local computer folder from a terminal?
When installing Django in a Python 3.7 virtual environment (Windows 7), the package downloads from the Internet.在 Python 3.7 虚拟环境(Windows 7)中安装 Django 时,package 从 Internet 下载。 But sometimes it happens that there is no access to the Internet.
但有时会发生无法访问 Internet 的情况。 And if, for example, the installation package is located in the C: \ python_works \ Django-2.2.5.tar.gz folder on the computer, is it possible to install Django in the Python 3.7 virtual environment from this folder and how to do it, if possible?
And if, for example, the installation package is located in the C: \ python_works \ Django-2.2.5.tar.gz folder on the computer, is it possible to install Django in the Python 3.7 virtual environment from this folder and how to做,如果可能的话? Thank you in advance for your reply.
预先感谢您的回复。
You can download the Django Source here .您可以在此处下载 Django 源代码。 After you have downloaded it, you need to build a.whl file from it.
下载后,您需要从中构建一个.whl 文件。 More information on how to do that can be found here .
可以在此处找到有关如何执行此操作的更多信息。
You can then install the local.whl file by entering: pip install path/to/foo.whl
.然后,您可以通过输入:
pip install path/to/foo.whl
安装 local.whl 文件。
Edit: You could as well just download the.whl file from here , instead of building your own.编辑:您也可以从此处下载 .whl 文件,而不是自己构建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.