pythonubuntuopenstackdevstack

Error while installing Devstack on Ubuntu : "/opt/stack/requirements/.venv/bin/pip" not exists


While trying to install devstack, I got this error saying:

+inc/python:pip_install:359 env http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite /opt/stack/requirements/.venv/bin/pip install -c /opt/stack/requirements/up
per-constraints.txt -U pbr
env: ‘/opt/stack/requirements/.venv/bin/pip’: No such file or directory
+inc/python:pip_install:1 exit_trap
+./stack.sh:exit_trap:515 local r=127
++./stack.sh:exit_trap:516 jobs -p
+./stack.sh:exit_trap:516 jobs=
+./stack.sh:exit_trap:519 [[ -n '' ]]
+./stack.sh:exit_trap:525 '[' -f '' ']'
+./stack.sh:exit_trap:530 kill_spinner
+./stack.sh:kill_spinner:425 '[' '!' -z '' ']'
+./stack.sh:exit_trap:532 [[ 127 -ne 0 ]]
+./stack.sh:exit_trap:533 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:535 type -p generate-subunit
+./stack.sh:exit_trap:536 generate-subunit 1536645760 69 fail
+./stack.sh:exit_trap:538 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:541 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
+./stack.sh:exit_trap:550 exit 127

It looks like I am unable to install pip in the virtualenv of devstack. I tried virtualenv command in the requirements directory but unfortunately the error persists.


Solution

  • After trying many solutions which did not work. I finally got it working.

    The actual error is that devstack is unable to create a virtual environment for itself because it does not have access to some file in .cache directory. Unfortunately, this error will only pop up the first time you are trying to install devstack.

    I followed these steps:

    sudo chown -R stack:stack .cache/ virtualenv requirements/
    At this point, you should have pip in your .cache directory.

    The next step is to remove everything except /devstack and .cache directories and run
    cd devstack/ ./clean.sh

    Finally, run
    ./stack.sh

    PS : the aim is to set up virtual environment for devstack. You may choose your way of doing it.