更改pip安装路径
pip show matplotlib查看安装位置
去python环境下lib/site.py文件里修改user_site和user_base
USER_SITE,更改为anaconda的Lib文件夹下的site-packages文件夹。
USER_BASE,更改为anaconda的Scripts文件夹。
如果需要修改虚拟环境下默认安装路径,则在虚拟环境对应的lib/site.py文件里修改user_site和user_base。
# for distutils.commands.install
# These values are initialized by the getuserbase() and getusersitepackages()
# functions, through the main() function when Python starts.
USER_SITE ="J:\env\python38\site-packages"
USER_BASE = "D:\ProgramData\Miniconda3\Scripts"

浙公网安备 33010602011771号