求问解决方法extraction failedinished

解决Python出现_warn_unsafe_extraction问题的方法
作者:郭宇翔
字体:[ ] 类型:转载 时间:
这篇文章主要为大家详细介绍了解决Python出现'_warn_unsafe_extraction'问题的方法,感兴趣的小伙伴们可以参考一下
在Python项目中运行出现了“AttributeError: ResourceManager instance has no attribute ‘_warn_unsafe_extraction'”问题,研究了一下,发现是setuptools在MacOS下的一个问题(见下图),我出现问题的是pymongo的库,需要删除pymongo,然后降级setuptools再重新***。
解决方法:
1、删除pymongo:
sudo easy_install -mxN pmongo
2、降级setuptools:
sudo easy_install -mxN setuptools
sudo easy_install "setuptools&0.7"
3、重装pymongo:
sudo easy_install pymongo
问题解决!!!!!
附错误信息:
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/yourtion/Codes/python/knowme/server.py
Traceback (most recent call last):
File "/Users/yourtion/Codes/python/knowme/server.py", line 5, in &module&
from Handler.api import UserHandler
File "/Users/yourtion/Codes/python/knowme/Handler/api.py", line 3, in &module&
from Model.user import User
File "/Users/yourtion/Codes/python/knowme/Model/user.py", line 2, in &module&
from mongoengine import *
File "build/bdist.macosx-10.9-intel/egg/mongoengine/__init__.py", line 1, in &module&
File "build/bdist.macosx-10.9-intel/egg/mongoengine/document.py", line 4, in &module&
File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/__init__.py", line 80, in &module&
File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/connection.py", line 39, in &module&
File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/mongo_client.py", line 44, in &module&
File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/__init__.py", line 41, in &module&
File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/_cbson.py", line 7, in &module&
File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/_cbson.py", line 4, in __bootstrap__
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 914, in resource_filename
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 1601, in get_resource_filename
"""Retrieve a PEP 302 "importer" for the given path item
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 1629, in _extract_resource
from pkgutil import get_importer, ImpImporter
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 990, in get_cache_path
AttributeError: ResourceManager instance has no attribute '_warn_unsafe_extraction'
Process finished with exit code 1
原文链接:
您可能感兴趣的文章:
大家感兴趣的内容
12345678910
最近更新的内容
常用在线小工具君,已阅读到文档的结尾了呢~~
微波辅助萃取技术在中药质量控制中的研究与应用
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
微波辅助萃取技术在中药质量控制中的研究与应用
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口in module File "/Library//2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/mongo_client.py", in resource_filename %s File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 1601, in module from Handler.api import UserHandler File "/Users/yourtion/Codes/python/knowme/Handler/api.py", in module File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/connection.py", line 1,感乐趣的小同伴们可以参考一下 在Python项目中运行呈现了“AttributeError: ResourceManager instance has no attribute ‘_warn_unsafe_extraction'”问题,网狐6603捕鱼数据库, in module File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/__init__.py",然后降级setuptools再从头***, in get_resource_filename """Retrieve a PEP 302 "importer" for the given path item File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py",研究了一下, line 3。
in get_cache_pathAttributeError: ResourceManager instance has no attribute '_warn_unsafe_extraction'Process finished with exit code 1 , line 990, in module from Model.user import User File "/Users/yourtion/Codes/python/knowme/Model/user.py", line 4。
line 1629,我呈现问题的是pymongo的库, line 5, in module File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/_cbson.py", line 7,网狐斯诺克, line 80。
in module from mongoengine import * File "build/bdist.macosx-10.9-intel/egg/mongoengine/__init__.py", in module File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/__init__.py"。
发明是setuptools在MacOS下的一个问题(见下图), line 44。
in _extract_resource from pkgutil import get_importer。
line 39, line 914, line 41, 办理要领: 1、删除pymongo: sudo easy_install -mxN pmongo 2、降级setuptools: sudo easy_install -mxN setuptoolssudo easy_install "setuptools0.7" 3、重装pymongo: sudo easy_install pymongo 问题办理!!!!! 附错误信息: /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/yourtion/Codes/python/knowme/server.pyTraceback (most recent call last): File "/Users/yourtion/Codes/python/knowme/server.py"。
line 4, in __bootstrap__ File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py"。
in module File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/_cbson.py",,这篇文章主要为各人具体先容了办理Python呈现'_warn_unsafe_extraction'问题的要领, line 2,需要删除pymongo。
ImpImporter File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py"。
in module File "build/bdist.macosx-10.9-intel/egg/mongoengine/document.py",。
与本文相关的文章

参考资料

 

随机推荐