我的ubuntu上有许多python版本。我已经使用alias将python命令的默认版本设置为3.7。 我已经使用virtualenvwrapper创建了一个虚拟环境,并希望在这个虚拟环境中安装django。激活这个virtualif-I-typepython命令后,将运行3.7版。但如果我键入'pip install Django',则会安装与python2.7相关的旧版本1.13。你知道吗
我尝试过使用'pip install Django==2.2.6',但没有成功。 上面写着:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
如何强制pip安装与python3.7相关的版本?你知道吗
使用
pip3 install Django==2.2.6
您应该看看pyenv在同一系统上管理不同版本的Python
https://realpython.com/intro-to-pyenv/
你可以试试这个:
相关问题 更多 >
编程相关推荐