国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

解決Python出現(xiàn)_warn_unsafe_extraction問題的方法

2020-01-04 17:35:06
字體:
供稿:網(wǎng)友
這篇文章主要為大家詳細(xì)介紹了解決Python出現(xiàn)'_warn_unsafe_extraction'問題的方法,感興趣的小伙伴們可以參考一下
 

在Python項(xiàng)目中運(yùn)行出現(xiàn)了“AttributeError: ResourceManager instance has no attribute ‘_warn_unsafe_extraction'”問題,研究了一下,發(fā)現(xiàn)是setuptools在MacOS下的一個(gè)問題(見下圖),我出現(xiàn)問題的是pymongo的庫,需要?jiǎng)h除pymongo,然后降級(jí)setuptools再重新安裝。

Python,_warn_unsafe_extraction

解決方法:

1、刪除pymongo:

sudo easy_install -mxN pmongo

2、降級(jí)setuptools:

sudo easy_install -mxN setuptoolssudo easy_install "setuptools<0.7"

3、重裝pymongo:

sudo easy_install pymongo

問題解決!!!!!

附錯(cuò)誤信息:

/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 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_pathAttributeError: ResourceManager instance has no attribute '_warn_unsafe_extraction'Process finished with exit code 1

原文鏈接:http://blog.yourtion.com/solve-warn_unsafe_extraction.html


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 北安市| 武穴市| 德安县| 宁国市| 喀什市| 历史| 孝感市| 蛟河市| 湘阴县| 扎囊县| 万荣县| 磐石市| 沙洋县| 隆化县| 阿图什市| 马尔康县| 佛冈县| 衡山县| 西畴县| 菏泽市| 彩票| 利辛县| 石泉县| 宣恩县| 墨脱县| 柳林县| 利辛县| 嵊州市| 右玉县| 汉源县| 习水县| 留坝县| 隆安县| 潜山县| 长岛县| 车险| 尼勒克县| 彰化市| 德州市| 夹江县| 格尔木市|