4

Possible Duplicate:
What are site-packages in python and can you install/use them if you aren’t root?

sudo apt-get install pip creating /usr/local/lib/python2.7/dist-packages/boto error: could not create '/usr/local/lib/python2.7/dist-packages/boto': Permission denied 

pip install boto modifies the packages under /usr/local/bin in a Ubuntu box. Is this the way its supposed to work?

0

3 Answers 3

6

You can use the --user flag when installing python packages via pip or setup.py. This bypasses the need for root access by installing the package for the current user.

Some packages, such as virtualenv need to be installed by root but this is not a common requirement. It's always best to check package docs for installation requirements just in case.

See for more details:

How to manually install a pypi module without pip/easy_install?

How can I install packages in my $HOME folder with pip?

Sign up to request clarification or add additional context in comments.

1 Comment

You don't have to install virtualenv as root. For example, if you install it with pip --user, you simply need to add ~/.local/bin to your PATH.
6

The only package you should install as root is virtualenv :

 #pip install virtualenv 

Then, you can work in a virtual environment as a normal user. It permits you to experiment without breaking everything in your system:

 $virtualenv myproject $cd myproject/ $./bin/pip install boto 

Comments

0

Every python package you install will be installed in root directory, unless you use virtualenv. So you will need root access to modify the files in the installation folder. Try using sudo pip install boto.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.