Python -- 安装虚拟环境报错:returned non-zero exit status 1

具有原因不明,还以是安装的pip版本有点乱

具体参考:

https://blog.csdn.net/phker/article/details/118341214

https://pip.pypa.io/en/stable/installation/

https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment

 

我的操作:

- 安装虚拟环境:python3 -m venv --without-pip env

- 切换到虚拟环境:source env/bin/activate

- 获取pip安装文件:wget https://bootstrap.pypa.io/get-pip.py

- 安装pip:python get-pip.py

- 退出虚拟环境:deactivate

- 重新进入虚拟环境:source env/bin/activate

- 确认python:which python

- 确认pip:which pip

 

posted @ 2021-12-10 14:05  liDB  阅读(2886)  评论(0编辑  收藏  举报