Ask Your Question
0

OSError: [Errno 13] Permission denied when installing pip in virtualenv

asked 2011-06-14 12:35:04 -0500

yzt356 gravatar image

I'm trying to install openstack-dashboard but some errors occurred. My os is ubuntu10.04.2-server-amd64, and kernel version is 2.6.32-28-server. I have successfully installed openstack and could run an instance of the example the wiki provides. I followed the instructions of wiki and the virtualenv is set by command "easy_install virtualenv". The I run the command "python tools/install_venv.py" to install the dependency while error message displayed as follows:

root@SLOT12:~/openstack-dashboard/trunk/openstack-dashboard# python tools/install_venv.py checking dependencies... dependency check done. Creating venv... done. Installing pip in virtualenv... Traceback (most recent call last): File "tools/install_venv.py", line 152, in <module> main() File "tools/install_venv.py", line 145, in main create_virtualenv() File "tools/install_venv.py", line 102, in create_virtualenv if not run_command([WITH_VENV, 'easy_install', 'pip']).strip(): File "tools/install_venv.py", line 52, in run_command proc = subprocess.Popen(cmd, cwd=cwd, stdout=stdout) File "/usr/lib/python2.6/subprocess.py", line 633, in __init__ errread, errwrite) File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child raise child_exception OSError: [Errno 13] Permission denied

Thanks for your help.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2011-06-17 12:23:11 -0500

install_venv.py relies on pip (a python package manager). The script is detecting that you don't have pip and is attempting to install it into your system's site-packages. sudo is required for this action. To work around this without having to use sudo for the entire installation, do this prior to running install_venv.py:

sudo easy_install pip sudo easy_install virtualenv

Then run the script and you should be in good shape.

edit flag offensive delete link more
0

answered 2011-06-17 14:10:01 -0500

yzt356 gravatar image

Thanks Devin Carlen. I tried what you said but failed. But I solved the problem accidentally. I downloaded the source code from another machine and run it on mine, and the permission of some shell script is not -rwxr--r--. I merely change the permission of all .sh files and it works.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-06-14 12:35:04 -0500

Seen: 2,707 times

Last updated: Jun 17 '11