File not accessible error (setuptools) in logs

拟墨画扇 提交于 2019-12-07 13:54:51

问题


When I run my app, my app engine logs give me this error:

WARNING  2012-03-01 23:27:31,089 py_zipimport.py:139] Can't open 
zipfile/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/setuptools-0.6c11-py2.7.egg: 
IOError: [Errno 13] file not accessible: '/Library/Frameworks/Python.framework/
Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg'

What does this mean?


回答1:


The answer you have marked as accepted isn't helpful. An annoying bug in the App Engine SDK actually throws these errors when running the development server with Python 2.7. Here's how I fixed it:

  • Edit the file <local path to app engine>/google/appengine/tools/dev_appserver_import_hook.py
    • On most systems the local path to App Engine is /usr/local/google_appengine
  • Search for py27_optional=False (around line 477) and replace it with py27_optional=True

Every time you update your local App Engine SDK, you will need to redo this patch.

Credit Carl D'Halluin




回答2:


Errno 13 is EACCES. It means "permission denied". So the access permissions do not allow you to access that file. Check the permissions with ls -l /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg

A list of error names and explanations is usually found in the manual page for errno, or the C include file errno.h.




回答3:


This may happen after building a new library. For example, it happened to me after building lxml. Remake your symlinks from the appengine and it should fix your issue.



来源:https://stackoverflow.com/questions/9526358/file-not-accessible-error-setuptools-in-logs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!