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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM