Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 21193  / 2 Years ago, sun, september 18, 2022, 5:02:10

I want to install some Python package using pip. I get a surprising error:



error: could not create '/home/brian/anaconda/lib/python2.7/site-packages/PyDSTool': Permission denied

----------------------------------------
Command "/home/brian/anaconda/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-EIkik9/pydstool/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" install --record /tmp/pip-ipWEV7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-EIkik9/pydstool


Okay, so apparently, the command doesn't have permission to create a folder in my home directory. Already, this is troublesome to me! I have been having issues with this, and am not sure what to do...



Anyway, doing sudo pip install <package of interest> also doesn't work because:



brian@brian-linux:~$ sudo pip install pydstool
[sudo] password for brian:
sudo: pip: command not found


So, what now? I would rather not dig into sudoers and manually add in the bin path that sudo doesn't have access to. I would rather that my home directory behave as normal. Perhaps setting up my memory drives (with / on the SSD, and /home mounted on the HDD) was a very bad idea?


More From » permissions

 Answers
7

Looks like the permissions in your ~/ are messed up. All files there should be owned by you. Use find ~/ -user rootto see if root has taken over some of it, especially the directory’s in the error you posted. Change permissions back to yourself where necessary.



Where did you get "pip" and how was it installed?


[#20566] Monday, September 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
icielight

Total Points: 158
Total Questions: 92
Total Answers: 93

Location: San Marino
Member since Thu, Jun 30, 2022
2 Years ago
icielight questions
;