简体   繁体   English

如何从终端的本地计算机文件夹在虚拟环境 Python (Windows 7) 中安装 Django?

[英]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.

相关问题 如何将Python/Anaconda虚拟环境从一台电脑复制到另一台电脑? - How to copy Python/Anaconda virtual environment from one computer to another? 如何使用 Python 为 Windows 激活 Django 中的虚拟环境? - How to activate virtual environment in Django for Windows with Python? 如何将 python 模块从源安装到虚拟环境 - How to install python modules from sources onto a virtual environment 如何将虚拟环境中的python 3设置为Django的默认python - How to setup python 3 from virtual environment as the default python for Django 如何使 pipenv 在 Windows 10 的项目文件夹中安装虚拟环境 - How to make pipenv install virtual environment in project folder on Windows 10 如何在另一台计算机上使用python虚拟环境 - How to use python virtual environment in another computer Python 虚拟环境中的 /venv/bin/python 文件夹丢失 Pycharm - Python missing from /venv/bin/python folder in virtual environment Pycharm 如何阻止python在特定虚拟环境中安装模块并全局安装它们? - How to stop python from installing modules in specific virtual environment and install them globally? 如果将我的虚拟环境文件夹从本地计算机转移到共享文件夹,我的虚拟环境文件夹仍然可以工作吗? - Will my virtual environment folder still work if i shift it from my local machine to a shared folder? PIP-如何从本地文件夹安装依赖项? - PIP - How to install dependencies from local folder?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM