我可以在 Windows 7 中离线安装 Django 吗? [英] Can I install Django as offline in Windows 7?

查看:25
本文介绍了我可以在 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:

  1. https://github.com/django/在具有 Internet 连接的机器上下载 Django 版本django/发布
  2. 从 Django 1.11 开始,pytz 是一个依赖项.从pypi下载最新的轮子
  3. 将下载的文件传输到离线电脑
  4. 安装 pytz:pip install pytz-2017.3-py2.py3-none-any.whl(根据需要更新文件名)
  5. 安装 Django:pip install <release-name>.zip
  1. Download a Django release on a machine with internet connection from https://github.com/django/django/releases
  2. As of Django 1.11, pytz is a dependency. Download the latest wheel from pypi
  3. Transfer the downloaded files to the offline PC
  4. Install pytz: pip install pytz-2017.3-py2.py3-none-any.whl (update filename as appropriate)
  5. 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 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆