使用Anaconda与pip报错'_NamespacePath' object has no attribute 'sort'的解决方法
来源:互联网 发布:信仰的定义知乎 编辑:程序博客网 时间:2024/06/01 10:08
博主是python初学者,学习了一个月才得知Anaconda此等神器,于是卸载python3.6安装Anaconda4.4.0,殊不知刚安装就碰到操蛋情况:
在命令窗口输入conda或pip均报错。。。折腾了两天,总算初步解决
以下是解决方法,分三步:
1. 关于Anaconda3报错 AttributeError: '_NamespacePath' object has no attribute 'sort' ,先参考下面这篇博客:
http://www.cnblogs.com/newP/p/7149155.html
按照文中的做法是可以解决conda报错的,总结一下就是:一,把文件夹 D:\ProgramData\Anaconda3\Lib\site-packages\conda\_vendor\auxlib 中的 path.py 中,“except ImportError: ”修改为“except Exception:“;二、找到D:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg,删除(不放心的话,剪切到别的地方)
2.然而pip报错的问题还没解决。首先要安装setuptools模块,下载地址是:
https://pypi.python.org/pypi/setuptools#files
下载setuptools-36.5.0.zip解压,命令窗口进入到文件夹然后 python setup.py install ,如下图:
3.安装好setuptools模块之后应该能用easy_install了,我们要借助它来重新安装pip。命令窗口输入命令:easy_install pip
这样pip应该就能用了。
- 使用Anaconda与pip报错'_NamespacePath' object has no attribute 'sort'的解决方法
- Ubuntu报错'_NamespacePath' object has no attribute 'sort'
- python 使用 pip 安装 三方库的时候报错 “AttributeError: '_socketobject' object has no attribute...”
- Django报错:AttributeError: 'module' object has no attribute 的解决方法
- 'DataFrame' object has no attribute 'sort'
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- import json后,报错:AttributeError: 'module' object has no attribute 'dumps,原因分析及解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- 【python学习笔记(2)】脚本报错"AttributeError: 'module' object has no attribute 'xxx'"解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- hdu 6216 A Cubic number and A Cubic Number
- Java并发编程:volatile关键字解析
- StratoIO WebPrinter 是什么?StratoIO WebPrinter实现打印的过程,StratoIO WebPrinter Javascript API
- CDH 安装spark后,spark-shell启动报错
- Iterator遍历器删除集合中元素抛异常
- 使用Anaconda与pip报错'_NamespacePath' object has no attribute 'sort'的解决方法
- 计蒜客 16957 Skiing(2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 H)
- SparkStream:4)foreachRDD详解
- Hive 连接查询JOIN
- MyBatis集成Spring事务管理
- update select set
- 微信浏览器无法使用reload()刷新页面 gif图兼容性
- scikit-learn 梯度提升树(GBDT)调参小结
- top 命令详解