【发布时间】:2014-10-19 00:07:09
【问题描述】:
所以,我几天来一直在与这个持续存在的问题作斗争,这是我最新的死胡同:
我想卸载 cx_Oracle 重新开始。我找到了this,说要删除egg文件。
所以我做到了:
rm -rf /Users/xxx/.python-eggs/cx_Oracle-5.1.3-py2.7-macosx-10.8-x86_64.egg-tmp/
我现在看到的是我的阅读理解完全失败,但已经完成了。
然后我尝试运行脚本并得到:
File "time_reporting.py", line 31, in <module>
import cx_Oracle
File "build/bdist.macosx-10.8-x86_64/egg/cx_Oracle.py", line 7, in <module>
File "build/bdist.macosx-10.8-x86_64/egg/cx_Oracle.py", line 4, in __bootstrap__
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 951, in resource_filename
err.manager = self
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 1647, in get_resource_filename
def get_importer(path_item):
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 1677, in _extract_resource
except ImportError:
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 1017, in get_cache_path
Resource providers should call this method ONLY after successfully
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 997, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
[Errno 13] Permission denied: '/Users/xxx/.python-eggs/cx_Oracle-5.1.3-py2.7-macosx-10.8-x86_64.egg-tmp'
The Python egg cache directory is currently set to:
/Users/xxx/.python-eggs
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
现在我不知道该怎么办。 Python 2.7.8、OSX 10.8.5
【问题讨论】:
-
"也许您的帐户没有对该目录的写入权限?"
/Users/xxx,/Users/xxx/.python-eggs的权限是什么?您在哪个身份下运行命令?例如,您是否尝试将PYTHON_EGG_CACHE设置为/tmp? -
很抱歉,我对这个领域知之甚少,并不真正了解您的问题和/或如何回答这些问题。对于它的价值,sudo 似乎消除了这个错误。
-
请学习如何使用 virtualenv 来管理你的 Python 鸡蛋:opensourcehacker.com/2012/09/16/…
-
这一切都在 virtualenv 中。我很久以前就惨痛地吸取了教训。
标签: python pip setuptools easy-install