Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing imutils in ubuntu

Tags:

python

ubuntu

I'm unable to install imutils using commandline in ubuntu. I've used "pip install imutils" but its showing an error:

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

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_amorthyo/imutils/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Beko63-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_amorthyo/imutils
Storing debug log for failure in /home/amorthyo/.pip/pip.log

Please can anyone help????

like image 762
Amorthyo Ghosh Avatar asked Apr 12 '16 17:04

Amorthyo Ghosh


2 Answers

Your user doesn't have permission to write to that location. You need not run pip as root.

Try this instead:

pip install --user imutils

And add your local site packages directory to the PYTHONPATH - since you said you're on Ubuntu, this is likely at ~/.local/lib/python2.7/site-packages. Other readers should check the output of python -m site to find the user site directory and see if it's enabled.

like image 176
wim Avatar answered Oct 29 '22 13:10

wim


Try this instead: sudo pip install imutils It might be an issue of permission denied.

like image 37
Mobi Zaman Avatar answered Oct 29 '22 13:10

Mobi Zaman