Django安装问题

问题描述 投票:0回答:1

我刚刚开始学习Django。我运行以下命令来安装Django:

1. download and unpack Django-2.1.5.tar.gz in /u01
2. cd /u01/Python-3.7.2/bin
3. ./python3 -m venv ./python3 -m venv /u01/django  
4. source /u01/django/bin/activate
5. cd /u01/django/bin
6. ./pip3 install -e /u01/Django-2.1.5  
Obtaining file:///u01/Django-2.1.5
Collecting pytz (from Django==2.1.5)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe464ed25c0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytz/
...
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe464ed2278>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytz/
  Could not find a version that satisfies the requirement pytz (from Django==2.1.5) (from versions: )
No matching distribution found for pytz (from Django==2.1.5)

所以我下载并安装了最新的pytz-2018.9:

$ cd /u01/Python-3.7.2/bin
$  ./pip3 install ../../pytz-2018.9
Processing /home/alelai/pytz-2018.9
Installing collected packages: pytz
  Running setup.py install for pytz ... done
Successfully installed pytz-2018.9

并重申上面的步骤2-6。发生了同样的错误。

django
1个回答
0
投票

将PYTHONPATH设置为pytz位置后发出问题

© www.soinside.com 2019 - 2024. All rights reserved.