Join 3,512 readers in helping fund MetaFilter (Hide)


Python is a hydra. Help me tame it.
January 9, 2012 8:23 AM   Subscribe

Can someone help me debug this Python error message(s)?

So, I'm trying to install a python module called "distribute." Info on the package is available here.

I've been trying to install this package on my computer (Mac Book Pro that I own, if it matters) and I am having trouble figuring out what the error message(s) that I am getting means and how to resolve it so that the package can be installed.

I've copied the text of the error message(s) into Google Docs so that you can view it. See here.

More generally, is there a good process for figuring out these kinds of errors?

Thanks for any insight
posted by dfriedman to Computers & Internet (8 answers total) 1 user marked this as a favorite
 
os.rename(path, new_name)
OSError: [Errno 13] Permission denied



Trying to move/rename a file without permission. Run the installer as root (or whatever root is called on a mac)

In general, the very end of the stack trace tells you what the error was, and everything else tells you where the error occurred.
posted by qxntpqbbbqxl at 8:27 AM on January 9, 2012


Are you trying to work on the system python? It's a permission error.

one simple solution:

$ sudo python distribute_setup.py


I have a lot of opinions on the "right way" to set up python on OSX. I tend to like virtualenv off of ``brew install python --framework`` as the foundation.
posted by gregglind at 8:29 AM on January 9, 2012


Run "sudo python distribute_setup.py"
posted by Pogo_Fuzzybutt at 8:30 AM on January 9, 2012


Wow, that worked, thanks.

Off to figure out what that does.

Appreciate it.
posted by dfriedman at 8:31 AM on January 9, 2012


So, my more ridonkulous osx setup. It is totally overkill for experiments, but this level of hygiene gets to be useful for development work, to ensure 'non-interference', makes sure different version of libraries don't hurt each other (I do a lot of library development work), etc.

Some hints:

1) use gist.github.com or http://pastebin.com/ or such when posting code snippets. They allow editing, code highlight, etc, making it much easier for people to help :)
2) use stackoverflow.com and friends to ask and look up answers
3) ``pip`` is awesome, and much preferred over ``easy_install``. ``pip search whatever``, ``pip install whatever``... etc.

Off to figure out what that does.
--> What is sudo?
posted by gregglind at 8:44 AM on January 9, 2012


Run this:

sudo !!


Now type your password.
posted by deathpanels at 9:08 AM on January 9, 2012


If that doesn't work:

cd ..
chmod 777 .
cd
posted by deathpanels at 9:08 AM on January 9, 2012


chmod 777

No, don't do that. That makes the directory you're in writable by anyone, which won't do a darned thing in this case because the installer is trying to put files somewhere else. But making a directory writable by anyone is always treating the symptom instead of the cause (in this case, "installing a package systemwide requires administrative privileges").
posted by mendel at 5:36 PM on January 11, 2012


« Older Looking to buy/acquire a puppy...   |  I'm trying to keep my New Year... Newer »
This thread is closed to new comments.