zc.buildout构建项目时报错‘AttributeError: '_NamespacePath' object has no attribute 'sort'’
在使用zc.buildout构建项目时如果碰到‘AttributeError: '_NamespacePath' object has no attribute 'sort'’报错:
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "c:\python36\lib\site-packages\zc\buildout\buildout.py", line 2123, in main
getattr(buildout, command)(args)
File "c:\python36\lib\site-packages\zc\buildout\buildout.py", line 680, in install
[self[part]['recipe'] for part in install_parts]
File "c:\python36\lib\site-packages\zc\buildout\buildout.py", line 680, in <listcomp>
[self[part]['recipe'] for part in install_parts]
File "c:\python36\lib\site-packages\zc\buildout\buildout.py", line 1274, in __getitem__
options._initialize()
File "c:\python36\lib\site-packages\zc\buildout\buildout.py", line 1382, in _initialize
self.initialize()
File "c:\python36\lib\site-packages\zc\buildout\buildout.py", line 1388, in initialize
recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
File "c:\python36\lib\site-packages\zc\buildout\buildout.py", line 1338, in _install_and_load
allow_hosts=buildout._allow_hosts
File "c:\python36\lib\site-packages\zc\buildout\easy_install.py", line 920, in install
return installer.install(specs, working_set)
File "c:\python36\lib\site-packages\zc\buildout\easy_install.py", line 673, in install
ws.add(dist)
File "c:\python36\lib\site-packages\pkg_resources\__init__.py", line 790, in add
self._added_new(dist)
File "c:\python36\lib\site-packages\pkg_resources\__init__.py", line 990, in _added_new
callback(dist)
File "c:\python36\lib\site-packages\pkg_resources\__init__.py", line 3047, in <lambda>
add_activation_listener(lambda dist: dist.activate(replace=True), existing=False)
File "c:\python36\lib\site-packages\pkg_resources\__init__.py", line 2574, in activate
fixup_namespace_packages(self.location)
File "c:\python36\lib\site-packages\pkg_resources\__init__.py", line 2162, in fixup_namespace_packages
subpath = _handle_ns(package, path_item)
File "c:\python36\lib\site-packages\pkg_resources\__init__.py", line 2091, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "c:\python36\lib\site-packages\pkg_resources\__init__.py", line 2120, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
可以尝试升级一下setuptools来解决这个问题:
pip3 install --upgrade setuptools
zc.buildout构建项目时报错‘AttributeError: '_NamespacePath' object has no attribute 'sort'’的更多相关文章
- pycharm install python packaging tools时遇到AttributeError: '_NamespacePath' object has no attribute 'sort'错误
pycharm install python packaging tools时报错AttributeError: '_NamespacePath' object has no attribute 's ...
- 解决window7 x64位Anaconda启动报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
- 解决Win7(x64)Anaconda3报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
- facenet pyhton3.5 训练 train_softmax.py 时报错AttributeError: 'dict' object has no attribute 'iteritems'
报错原因:在进行facenet进行train_softmax.py训练时,在一轮训练结束进行验证时,报错AttributeError: 'dict' object has no attribute ' ...
- 在使用ubuntu16.04+python3.5 下使用pip3出现pip3 error - '_NamespacePath' object has no attribute 'sort'
使用pip3安装tensorflow以及gensim等时,出现如下错误: Traceback (most recent call last): File "/usr/local/bin/pi ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- py+selenium 明明定位不到元素,但却不报错或是报错AttributeError: 'list' object has no attribute 'click'【已解决】
问题:定位不到元素,但却不报错或者出现报错AttributeError: 'list' object has no attribute 'click' 如图 或者 解决方法: 将”driver ...
- dnspython模块报错 AttributeError: 'CNAME' object has no attribute 'address'
有时候用到这个模块的时候会报错 AttributeError: 'CNAME' object has no attribute 'address' 如下所示 [root@ansible ch01]# ...
- 关于flask登录视图报错AttributeError: '_AppCtxGlobals' object has no attribute 'user'
在一个小程序中写了一个登录视图函数,代码如下: @app.route('/login',methods = ['GET','POST']) @oid.loginhandler def login(): ...
随机推荐
- 书写优雅的shell脚本(插曲)- ed编辑器
今天发现了一个灰常好用的unix/linux文本行编辑器:ed,对于进行面向行的文本编辑工作她真是太棒了,比vi操作简单.方便.功能强大.感兴趣的同仁可以尝试一下!
- 贪吃蛇小游戏—C++、Opencv编写实现
贪吃蛇游戏,C++.Opencv实现 设计思路: 1.显示初始画面,蛇头box初始位置为中心,食物box位置随机 2.按随机方向移动蛇头,按a.s.d.w键控制移动方向,分别为向左,向下,向右,向上 ...
- SPOJ:Divisors of factorial (hard) (唯一分解&分块优化)
Factorial numbers are getting big very soon, you'll have to compute the number of divisors of such h ...
- darwin Stream Server源码分析
摘要 所谓的流式媒体简单的讲就是指人们通过网络实时的收看多媒体信息:如音频流.视频流等.与流式媒体对应的传统工作方式是下载+播放模式,即用户首先下载多媒体文件,然后再在本地播放,这种方法的一个主要缺 ...
- JS按字节截取字符长度实例
处理过长的字符串,截取并添加省略号 * 注:半角长度为1,全角长度为2 * * pStr:字符串 * pLen:截取长度 * * return: 截取后的字符串 * 代码如下: function ...
- java中为什么inputstreamreader和buffered reader要配合着用
因为InputStreamReader是字节输出(汉字会被分为两个字节),而BufferedReader是它的“包装”(整行读取),效率更高,所以配合使用更好.可以通过BufferedReader 流 ...
- Lua变量
Lua 变量 变量在使用前,必须在代码中进行声明,即创建该变量. 编译程序执行代码之前编译器需要知道如何给语句变量开辟存储区,用于存储变量的值. Lua 变量有三种类型:全局变量.局部变量.表中的域. ...
- UVaLive 7456 Least Crucial Node (并查集+暴力 或者 求割点)
题意:求标号最小的最大割点.(删除该点后,指定点#sink能到达的点数减少最多). 析:由于不知道要去掉哪个结点,又因为只有100个结点,所以我们考虑用一个暴力,把所有的结点都去一次,然后用并查集去判 ...
- UVa 1336 Fixing the Great Wall (区间DP)
题意:给定 n 个结点,表示要修复的点,然后机器人每秒以 v 的速度移动,初始位置在 x,然后修复结点时不花费时间,但是如果有的结点暂时没修复, 那么每秒它的费用都会增加 d,修复要花费 c,坐标是 ...
- Hibernate3--快速入门--第一天
1. Hibernate概述 Hibernate是轻量级JavaEE应用的持久层解决方案,是一个关系数据库ORM框架. a. 轻量级: 使用方便 (比Apache DbUtils 复杂很多倍 )这个概 ...