Can I install Django as offline in Windows 7?(我可以在 Windows 7 中离线安装 Django 吗?)
问题描述
我是 Python 和 PyCharm 的新手.当我尝试制作 Django 项目时,它会显示一个错误框.后来我发现这是由于我的电脑上没有可用的互联网连接.
I'm new to Python and PyCharm. When I'm trying to make a Django project, it shows an error box. Later I found that it's due to no availability of internet connection on my PC.
有没有办法在 Windows 7 PC 上离线安装 Django?
Is there any way to install Django as offline in Windows 7 PC?
推荐答案
如果需要离线安装Django:
If you need to perform an offline installation of Django:
- 从 https://github.com/django/在具有 Internet 连接的机器上下载 Django 版本django/发布
- 从 Django 1.11 开始,pytz 是一个依赖项.从pypi下载最新的轮子
- 将下载的文件传输到离线电脑
- 安装 pytz:
pip install pytz-2017.3-py2.py3-none-any.whl(根据需要更新文件名) - 安装 Django:
pip install <release-name>.zip
- Download a Django release on a machine with internet connection from https://github.com/django/django/releases
- As of Django 1.11, pytz is a dependency. Download the latest wheel from pypi
- Transfer the downloaded files to the offline PC
- Install pytz:
pip install pytz-2017.3-py2.py3-none-any.whl(update filename as appropriate) - Install Django:
pip install <release-name>.zip
比如你从Github上下载了django-1.9.2.zip,可以通过运行安装
For example, if you downloaded django-1.9.2.zip from Github, you can install it by running
pip install django-1.9.2.zip
这篇关于我可以在 Windows 7 中离线安装 Django 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我可以在 Windows 7 中离线安装 Django 吗?
基础教程推荐
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
