R S
R S

Reputation: 11879

Can I use setuptools without permissions to /usr/local etc

I want to use some packages (i.e., IPython or zdaemon), butI am doing this on a system (my university) that does not give me permissions for /usr/local, /usr/bin, or all these directories. Is there a way around it?

Upvotes: 1

Views: 2437

Answers (3)

Jokey
Jokey

Reputation: 90

Other Option is using virtualenv to help, if available

$ virtualenv myenv $ source myenv/bin/activate (myenv)$ easy_install mycoolpackage

now it will end up in myenv subdir to re-activate, just call the source line above and to deactivate it, just close the terminal or (myenv)$ deactivate $

Upvotes: 1

David Z
David Z

Reputation: 131600

Sure, you can use a configuration file that specifies an alternate installation directory, or use the --install-dir option. The standard place to put Python packages in your own user account is, I think, in $HOME/.local/ (if you're using Python 2.6). So for instance, pure-Python packages will wind up in $HOME/.local/lib/python2.6/site-packages/.

If your version of setuptools is recent enough to support it, also have a look at the --prefix option.

Upvotes: 5

Matthew Flaschen
Matthew Flaschen

Reputation: 284836

Use the --install-dir option. You need to make sure this directory is in PYTHONPATH. You may find the documentation helpful.

Upvotes: 2

Related Questions