zc.buildout构建项目时报错‘AttributeError: '_NamespacePath' object has no attribute 'sort'’

时间:2021-12-22 06:46:35

在使用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'’的更多相关文章

  1. pycharm install python packaging tools时遇到AttributeError&colon; &&num;39&semi;&lowbar;NamespacePath&&num;39&semi; object has no attribute &&num;39&semi;sort&&num;39&semi;错误

    pycharm install python packaging tools时报错AttributeError: '_NamespacePath' object has no attribute 's ...

  2. 解决window7 x64位Anaconda启动报错:AttributeError&colon; &&num;39&semi;&lowbar;NamespacePath&&num;39&semi; object has no attribute &&num;39&semi;sort&&num;39&semi;

    最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...

  3. 解决Win7&lpar;x64&rpar;Anaconda3报错:AttributeError&colon; &&num;39&semi;&lowbar;NamespacePath&&num;39&semi; object has no attribute &&num;39&semi;sort&&num;39&semi;

    最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...

  4. facenet pyhton3&period;5 训练 train&lowbar;softmax&period;py 时报错AttributeError&colon; &&num;39&semi;dict&&num;39&semi; object has no attribute &&num;39&semi;iteritems&&num;39&semi;

    报错原因:在进行facenet进行train_softmax.py训练时,在一轮训练结束进行验证时,报错AttributeError: 'dict' object has no attribute ' ...

  5. 在使用ubuntu16&period;04&plus;python3&period;5 下使用pip3出现pip3 error - &&num;39&semi;&lowbar;NamespacePath&&num;39&semi; object has no attribute &&num;39&semi;sort&&num;39&semi;

    使用pip3安装tensorflow以及gensim等时,出现如下错误: Traceback (most recent call last): File "/usr/local/bin/pi ...

  6. Python脚本报错AttributeError&colon; &OpenCurlyQuote;module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  7. py&plus;selenium 明明定位不到元素,但却不报错或是报错AttributeError&colon; &&num;39&semi;list&&num;39&semi; object has no attribute &&num;39&semi;click&&num;39&semi;【已解决】

    问题:定位不到元素,但却不报错或者出现报错AttributeError: 'list' object has no attribute 'click' 如图  或者  解决方法:   将”driver ...

  8. dnspython模块报错 AttributeError&colon; &&num;39&semi;CNAME&&num;39&semi; object has no attribute &&num;39&semi;address&&num;39&semi;

    有时候用到这个模块的时候会报错 AttributeError: 'CNAME' object has no attribute 'address' 如下所示 [root@ansible ch01]# ...

  9. 关于flask登录视图报错AttributeError&colon; &&num;39&semi;&lowbar;AppCtxGlobals&&num;39&semi; object has no attribute &&num;39&semi;user&&num;39&semi;

    在一个小程序中写了一个登录视图函数,代码如下: @app.route('/login',methods = ['GET','POST']) @oid.loginhandler def login(): ...

随机推荐

  1. ContentProvider跨进程共享数据

    借用ContentResolver类访问ContentProvider*享的数据.通过getContentResolver()方法获得该类的实例. ContentResolver中的方法:inser ...

  2. WKWebView比UIWebView优越性

    1.在使用两者的过程中发现前者比后者节省内存一倍多,WKWebView 是苹果在 iOS 8 中引入的新组件,目的是给出一个新的高性能的 Web View 解决方案,摆脱过去 UIWebView 的老 ...

  3. EAA脚本语言0&period;2

    对上一版的改进.IL生成问题大部分解决了. 运行效果 脚本源码 #using "System"; #using "System.Drawing"; #using ...

  4. C语言中计算变量占用内存空间

    C语言中计算变量占用内存空间 在C语言中通常用[sizeof]运算符计算变量占内存空间,如下面的例子:

  5. Linux内核如何启动并装载一个可执行程序

    2016-04-07 张超<Linux内核分析>MOOC课程http://mooc.study.163.com/course/USTC-1000029000#/info 一.理解编译链接的 ...

  6. MD5 概念与用途

    MD5概念: MD5这是message-digest algorithm 5(信息-摘要算法)缩写.用于加密和解密技术上,它能够说是文件的"数字指纹".不论什么一个文件,不管是可运 ...

  7. mac pycharm 里table键设置为4个空格键

    Operation flow: File--Default Settings editor--code style--python

  8. XML详解一XML语法

    XML指可扩展标记语言很类似 HTML,被设计用来传输和存储数据而非显示数据,XML标签没有被预定义需要自行定义标签,标签具有自我描述性,同时XML也是 W3C 的推荐标准. 先来写一个XML脚本de ...

  9. Oracle EXPDP&sol;IMPDP示例

    待整理: 参考DAVE博客 http://blog.csdn.net/tianlesoftware/article/details/6260138

  10. scrapy windows 安装

    windows 7 系统下参照官网安装总是会提示出错,现在整理一下安装的流程 1.安装 python 2.7,添加环境变量 C:\Python27\;C:\Python27\Scripts\; 在 C ...