我尝试使用sudo pip install Django
命令安装Django。它已下载但卡在错误 - Command "python setup.py egg_info" failed with error code 1
。
终奌站
我已经安装了Python 3.6.3
,但pip
仍然指向Python 2.7
,上面的问题发生是因为pip没有指向python 3.6.3
?
终奌站
您可以使用
python3.6 -m pip install
但是如果你为python 3.6创建virtualenv然后在其中安装包会更好
如前所述,您最好使用虚拟环境进行安装。
看看pipenv 它简化了管理虚拟环境的整个过程。
pipenv --python 3.6 install django
上面的命令将使用python 3.6创建一个虚拟环境并安装django