SeyZ/baboon

Crash: pip install --user baboon

rvanlaar opened this issue · 4 comments

I prefer installing python packages as the user with pip install --user.

This is broken for baboon:

$ pip install --user .
Unpacking /home/roland/dev/build/baboon
  Running setup.py egg_info for package from file:///home/roland/dev/build/baboon

Requirement already satisfied (use --upgrade to upgrade): dnspython>=1.9.4 in /home/roland/.local/lib/python2.7/site-packages (from baboon==0.1.3-1)
Requirement already satisfied (use --upgrade to upgrade): watchdog>=0.6.0 in /home/roland/.local/lib/python2.7/site-packages (from baboon==0.1.3-1)
Requirement already satisfied (use --upgrade to upgrade): sleekxmpp==1.1.11beta in /home/roland/.local/lib/python2.7/site-packages (from baboon==0.1.3-1)
Requirement already satisfied (use --upgrade to upgrade): termcolor>=1.1.0 in /home/roland/.local/lib/python2.7/site-packages (from baboon==0.1.3-1)
Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.09 in /home/roland/.local/lib/python2.7/site-packages (from watchdog>=0.6.0->baboon==0.1.3-1)
Requirement already satisfied (use --upgrade to upgrade): argh>=0.8.1 in /home/roland/.local/lib/python2.7/site-packages (from watchdog>=0.6.0->baboon==0.1.3-1)
Requirement already satisfied (use --upgrade to upgrade): pathtools in /home/roland/.local/lib/python2.7/site-packages (from watchdog>=0.6.0->baboon==0.1.3-1)
Requirement already satisfied (use --upgrade to upgrade): argparse>=1.1 in /usr/lib/python2.7 (from argh>=0.8.1->watchdog>=0.6.0->baboon==0.1.3-1)
Installing collected packages: baboon
  Running setup.py install for baboon
    error: could not create '/usr/lib/python2.7/dist-packages/baboon': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-CeJvEd-build/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Mh6Jlp-record/install-record.txt --user:
    running install

running build

running build_py

running build_scripts

running install_lib

running install_data

creating /usr/lib/python2.7/dist-packages/baboon

error: could not create '/usr/lib/python2.7/dist-packages/baboon': Permission denied

Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-CeJvEd-build/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Mh6Jlp-record/install-record.txt --user failed with error code 1 in /tmp/pip-CeJvEd-build
SeyZ commented

Have you got your PYTHONUSERBASE set to the directory you want?

export PYTHONUSERBASE=<the_path_you_want>
pip install baboon --user

http://docs.python.org/dev/using/cmdline.html#envvar-PYTHONUSERBASE

I haven't set the PYTHONUSERBASE.
Other python packages install to the ~/.local/ directory when installed with pip install --user packagename

This was due to an outdated distribute on my system. This was fixed with sudo pip install --upgrade distribute.

SeyZ commented

Great!