[Tutor] IOError when importing nose

Walter Prins wprins at gmail.com
Sat Jul 13 16:54:25 CEST 2013


Hi,


On 13 July 2013 15:14, Albert-Jan Roskam <fomcl at yahoo.com> wrote:

> IOError: [Errno 13] Permission denied:
> '/usr/local/lib/python2.7/dist-packages/pypi_classifiers-0.1-py2.7.egg/EGG-INFO/top_level.txt'
> >>> quit()
> antonia at antonia-HP-2133/usr/local/lib/python2.7/dist-packages/pypi_classifiers-0.1-py2.7.egg/EGG-INFO
> $ ls -l
> total 24
> -rw------- 1 root staff    1 Jan 26 14:36 dependency_links.txt
> -rw------- 1 root staff 1311 Jan 26 14:36 PKG-INFO
> drwxr-sr-x 2 root staff 4096 Jan 26 14:36 scripts
> -rw------- 1 root staff  269 Jan 26 14:36 SOURCES.txt
> -rw------- 1 root staff   16 Jan 26 14:36 top_level.txt
> -rw-r--r-- 1 root staff    1 Jan 26 14:36 zip-safe
>
>
It appears to me this is not directly a problem with your nose
installation.  As you can see it's apparently some other package
(pypi_classifiers) which has previously been installed and has incorrect
file permissions on some files that's causing trouble.

(As an aside re your nose installation, note that on Linux it's slightly
preferable to use the package manager if available to install even Python
packages, instead of pip if possible, e.g on Debian and variants (Ubuntu,
Mint etc) you'd use: sudo apt-get install python-nose)

That said, if you want to try and blanket fix your current permissions to
give group and world (other) readability on all the files in dist-packages
(probably a reasonable fix to do) you can do:

sudo chmod -R go+r /usr/loca/lib/python2.7/dist-packages

Some clarification of options:
-R = recursive
go = apply to "group" and "other"
+ = add permissions
r = read permission

You can also try uninstalling via pip again (sudo pip uninstall nose) and
then try installing via the package manager again to see if this helps (but
as above, I don't think it will, the problem appears to me not to be
directly related to your nose installation.)


Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130713/18b67734/attachment-0001.html>


More information about the Tutor mailing list