在“ amazon linux”中无法通过“成功安装django-2.2”安装django

时间:2020-01-14 17:02:14

标签: django amazon-linux

我尝试在Amazon Linux ami中制作django服务器。

我安装了python3,pip并制作了virtualenv。激活virtualenv之后,我尝试安装django。

但是安装后,我只找不到Django。其他软件包安装正确。

我想念什么吗?预先感谢!

(python3) [ec2-user@ip-10-0-1-xxx ~]$ pip install django==2.2
Collecting django==2.2
  Using cached https://files.pythonhosted.org/packages/54/85/0bef63668fb170888c1a2970ec897d4528d6072f32dee27653381a332642/Django-2.2-py3-none-any.whl
Collecting sqlparse
  Using cached https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a37886585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Collecting pytz
  Using cached https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl
Installing collected packages: sqlparse, pytz, django
Successfully installed django-2.2 pytz-2019.3 sqlparse-0.3.0
(python3) [ec2-user@ip-10-0-1-xxx ~]$ pip freeze
pytz==2019.3
sqlparse==0.3.0
(python3) [ec2-user@ip-10-0-1-xxx ~]$

pip安装得很好,可以代替pip3

使用
(python3) [ec2-user@ip-10-0-1-xxx ~]$ pip3 -V
pip 19.3.1 from /home/ec2-user/venv/python3/local/lib/python3.6/dist-packages/pip (python 3.6)
(python3) [ec2-user@ip-10-0-1-xxx ~]$ pip -V
pip 19.3.1 from /home/ec2-user/venv/python3/local/lib/python3.6/dist-packages/pip (python 3.6)
(python3) [ec2-user@ip-10-0-1-xxx ~]$ which python3
~/venv/python3/bin/python3

0 个答案:

没有答案