- Win系统下面安装了2个版本的python
- 因为之前python3.7已经安装了很多有关tar包,已经有项目在使用
- 需要切换更高的版本python3.8使用,这样又需要重新下载tar包到scripts文件夹下面
其实如果遇到多版本python需要切换的话,建议使用virtualEnv的方法,我在之前的帖子已经写过。
更改python默认的pip install默认使用pip库
- 打开终端并查看当前pip包存放路径
pip show pip
image.png
-
主要是Script文件夹需要在Path中靠前位置
image.png
更改Python的pip install默认安装路径
- 查看site.py文件路径
python -m site -help
image.png
- 打开site.py并修改USER_BASE 和 USER_SITE
USER_BASE: 用户自定义安装依赖包路径
USER_SITE: 用户自定义启用Python脚本路径
安装库文件并进行验证
pip install wheel
image.png
image.png
python -m site
image.png
网友评论