首页 > 解决方案 > 如何删除其他 python 版本并继续使用 python 3.5

问题描述

我已经安装了 Python3.5.6,但是当我检查我的终端时,我发现我还有 Python 2.7.15rc1 和 Python 3.6.7 当我输入 Python 时,我会导致 Python 2.7.15rc1 当我输入 Python3 时,我会导致 Python 3.5。 6 当我输入 Python3.5 时,我会导致 Python 3.5.6 当我输入 Python3.6 时,我会导致 Python 3.6.7

请帮忙,因为我无法在 Python 3.5 上使用 pip3 安装像 numpy 这样的包

我想继续使用 Python 3.5

标签: pythonpython-3.x

解决方案


使用虚拟环境

$ python3.x -m venv <venvname>
linux   $ source venvname/bin/activate
windows > source venvname/bin/activate.ps1

终端中的虚拟环境以安装到该本地单独副本。

或使用“make altinstall”重新安装-> https://stackoverflow.com/a/2547577/6529424


推荐阅读