zc.buildout构建项目时报错‘AttributeError: &a…
2018-06-18 00:39: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
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
下一篇:python学习随笔day2
- Django项目中使用qq第三方登录。 2019-08-13
- 把Python项目打包成exe文件 2019-08-13
- svn下载项目的时候出现 Path to certificate 2019-08-13
- django框架使用及创建项目 2019-07-24
- PyCharm如何导入python项目 2019-07-24
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash