Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]How use pip while avoiding permission denied errors?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Cecillian
n00b
n00b


Joined: 28 Jul 2015
Posts: 14

PostPosted: Tue Dec 01, 2015 8:45 pm    Post subject: [Solved]How use pip while avoiding permission denied errors? Reply with quote

Many things off of github I'd like to install, but it requires me to use 'pip install []', however, I often encounter "permission denied" errors installing things with pip. And the last time I used 'sudo pip install', it broke python and subsequently broke portage and I've heard that happens and it's generally discouraged to use pip under su.

How can I use pip to install software and avoid permission denied errors without using sudo?

Example:
Code:
pip install pyperclip                                                ~/clireddit/cliReddit   
Downloading/unpacking pyperclip
  Downloading pyperclip-1.5.24.zip
  Running setup.py (path:/tmp/pip_build_duo/pyperclip/setup.py) egg_info for package pyperclip
   
Installing collected packages: pyperclip
  Running setup.py install for pyperclip
    error: could not create '/usr/lib64/python3.4/site-packages/pyperclip': Permission denied
    Complete output from command /usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip_build_duo/pyperclip/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-fsbg1uu7-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib

creating build/lib/pyperclip

copying pyperclip/windows.py -> build/lib/pyperclip

copying pyperclip/__init__.py -> build/lib/pyperclip

copying pyperclip/exceptions.py -> build/lib/pyperclip

copying pyperclip/clipboards.py -> build/lib/pyperclip

running install_lib

creating /usr/lib64/python3.4/site-packages/pyperclip

error: could not create '/usr/lib64/python3.4/site-packages/pyperclip': Permission denied

----------------------------------------


And I don't dare to use an example with sudo because I don't feel like fixing portage again.

[/code] python -V ~/clireddit/cliReddit
Python 3.4.3
[/code]


Last edited by Cecillian on Wed Dec 16, 2015 3:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
bec
Apprentice
Apprentice


Joined: 30 Sep 2004
Posts: 218
Location: Cali - Colombia

PostPosted: Tue Dec 15, 2015 2:56 pm    Post subject: Reply with quote

If you want to install as user, see:

http://stackoverflow.com/questions/7143077/how-can-i-install-packages-in-my-home-folder-with-pip
_________________
abe
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum