当电脑安装有多个 Python 版本的时候,应该选用哪个来安装 pipenv 呢()

【当电脑安装有多个 Python 版本的时候,应该选用哪个来安装 pipenv 呢()】比如我的系统是 Ubuntu20.04,安装了三个 Python 解释器:

  • 系统自带的 python3.8
  • 使用 sudo apt install python3.9 安装的 python3.9
  • 从源代码自己编译的 python3.10
Ubuntu20.04 从源代码编译安装 python3.10
这个时候,我想安装 pipenv 就有了 4 个选择:
  • 使用 apt 包管理器安装 pipenv,sudo apt install pipenv
  • 使用 python3.8 的 pip 包管理器安装 pipenv,pip3.8 install pipenv
  • 使用 python3.9 的 pip 包管理器安装 pipenv,pip3.9 install pipenv
  • 使用 python3.10 的 pip 包管理器安装 pipenv,pip3.10 install pipenv
该选哪个呢?如果你用的是 python3.8 和 python3.9 这种可以通过 apt 包管理器安装的 Python 版本,那我建议你使用 apt 安装 pipenv
但是如果像我一样使用 python3.10 的话,pipenv 的版本可能比较老,可能不支持最新的 python,那就可以使用 pip3.10 install pipenv 来支持 python3.10 的正常工作

    推荐阅读