Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pip installing globally and not in virtual environment --- even with all paths and pip pointing to the right place

I have read pip installing in global site-packages instead of virtualenv and made sure that everything is correct, i even reinstalled pip with easy_install within the virtaulenv.

What happens is strange. First it wont let me install a package without sudo... if I read the text output it tries to place it in the virtualenv path as expected.. I then use sudo and it works.

But if I try to install the package (in this case django-bootstrap3) then it states:

(env)kevin@g3:~/djangoP/work$ sudo pip install django-bootstrap3
Requirement already satisfied (use --upgrade to upgrade): django-bootstrap3 in /usr/local/lib/python3.4/dist-packages

which from what I understand means that it is installed outside of the virtualenv.

Not really sure what to do. Have read a few blogs and many people have variations of the issue but I cannot seem to find a solution for myself.

I am using Ubuntu 14, Python 2.7 and working in my home directory.

Any help would be great.

Thank you.

like image 392
Curious Lambda Avatar asked Sep 26 '22 16:09

Curious Lambda


1 Answers

You can simply use

./bin/pip

to install anything in your virtual environment. (I can't comment that's why I had to write here).

like image 187
Kamal Singh Avatar answered Sep 30 '22 06:09

Kamal Singh