在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 %s 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
原文链接:http://blog.yourtion.com/solve-warn_unsafe_extraction.html
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“解决Python出现_warn_unsafe_extraction问题的方法”评论...
更新动态
2024年11月25日
2024年11月25日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]