包的安装问题——python

1. 当uninstall或者upgrade包时遇到类似下面的问题时:

It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. 

 解决:在安装路径下找到“XXX.egg-info”文件,然后删除它。稍后再继续后面uninstall或者upgrade包的操作。

 

 2. 当install时遇到类似的问题:

ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。
Consider using the `--user` option or check the permissions.

 解决:在pip语句的最后面添加'--user'即可,例如:

pip install XXX --user

3. 更新单个包

pip install --upgrade XXX

4. 卸载某包

pip uninstall XXX

 5.  Annoconda prompt时pip报错sys.exit(pip.main()) AttributeError: module 'pip' has no attribute 'main':

解决:

easy_install --upgrade pip

6. 加载pickle数据时发生错误:ModuleNotFoundError: No module named 'pandas.core.internals.managers'; 'pandas.core.internals' is not a package

解决:升级pandas

pip install -U pandas --user

 

posted @ 2019-11-15 19:39  熊猫blue  阅读(814)  评论(0编辑  收藏  举报