Reputation: 11038
I have the neurolab
package version 0.2.0
in /usr/local/lib/python2.7/dist-packages
.
Now I would like to install neurolab
version 0.1.0
in a virtual environment.
This is after installing pip and virtualenv:
~$ mkdir neuro_env
~$ cd neuro_env
~/neuro_env$ virtualenv envi
~/neuro_env$ source envi/bin/activate
(envi)~/neuro_env$ pip install neurolab==0.1.0
Then the install fails, with at the end of the error the line:
IOError: [Errno 13] Permission denied: '/home/username/.pip/pip.log'
But when I install it with permissions like this:
(envi)~/neuro_env$ sudo pip install neurolab==0.1.0
Then version 0.1.0
is just installed globally again (in /usr/local/lib/python2.7/dist-packages
)
I read I could use the -E flag, but that is not possible anymore it seems:
error: no such option: -E
So how do I install neurolab
version 0.1.0
only for my project in~/neuro_env
?
(envi)~/neuro_env$ ls -l /home/username/.pip
total 4
-rw-r--r-- 1 root root 874 2012-07-28 13:18 pip.log
Upvotes: 1
Views: 5303
Reputation: 195
if you are using windows. type in powershell or terminal:
python -m pip install WHATEVER
Upvotes: 0
Reputation: 30183
The problem is that your /home/username/.pip/pip.log
file is only writable by root, so when you try to use pip
as another user you don't have permission to update the log file and the whole operation fails.
Changing the ownership of the log file (using sudo chown username:username /home/username/.pip/pip.log
) or removing it (using sudo rm /home/username/.pip/pip.log
) should fix your problem.
Upvotes: 4