解决Python出现_warn_unsafe_extraction问题的方法
2016-03-24 00:00
756 查看
在Python项目中运行出现了“AttributeError: ResourceManager instance has no attribute ‘_warn_unsafe_extraction'”问题,研究了一下,发现是setuptools在MacOS下的一个问题(见下图),我出现问题的是pymongo的库,需要删除pymongo,然后降级setuptools再重新安装。
解决方法:
1、删除pymongo:
2、降级setuptools:
3、重装pymongo:
问题解决!!!!!
附错误信息:
原文链接:http://blog.yourtion.com/solve-warn_unsafe_extraction.html
Python编写的com组件发生R6034错误的原因与解决办法
Python 错误和异常小结
Python程序员开发中常犯的10个错误
python新手经常遇到的17个错误分析
python错误:AttributeError: ''module'' object has no attribute ''setdefaultencoding''问题的解决方法
python错误处理详解
Python提示[Errno 32]Broken pipe导致线程crash错误解决方法
python base64 decode incorrect padding错误解决方法
Python中设置变量作为默认值时容易遇到的错误
解决方法:
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
您可能感兴趣的文章:
Python运行的17个时新手常见错误小结Python编写的com组件发生R6034错误的原因与解决办法
Python 错误和异常小结
Python程序员开发中常犯的10个错误
python新手经常遇到的17个错误分析
python错误:AttributeError: ''module'' object has no attribute ''setdefaultencoding''问题的解决方法
python错误处理详解
Python提示[Errno 32]Broken pipe导致线程crash错误解决方法
python base64 decode incorrect padding错误解决方法
Python中设置变量作为默认值时容易遇到的错误
相关文章推荐
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- install and upgrade scrapy
- Scrapy的架构介绍
- Centos6 编译安装Python
- 使用Python生成Excel格式的图片
- 让Python文件也可以当bat文件运行
- [Python]推算数独
- Python中zip()函数用法举例
- Python中map()函数浅析
- Python将excel导入到mysql中
- Python在CAM软件Genesis2000中的应用
- 使用Shiboken为C++和Qt库创建Python绑定
- FREEBASIC 编译可被python调用的dll函数示例
- Python 七步捉虫法