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

Asked by xelatex

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.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Dashboard (Horizon) Edit question
Assignee:
Devin Carlen Edit question
Solved by:
xelatex
Solved:
Last query:
Last reply:
Revision history for this message
Devin Carlen (devcamcar) said :
#1

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.

Revision history for this message
xelatex (yzt356) said :
#2

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.