Adrian Lopez
Adrian Lopez

Reputation: 2877

Virtualenv not detecting pip3

I'm having problems running pip3 from virtualenv. If I run 'pip3 install django' in my active virtualenv, it will try to install it in my virtualenv, but fail because need privileges. The problem is, that when I use 'sudo pip3 install django', installs django globally. How can I avoid that?

Upvotes: 3

Views: 1077

Answers (1)

Adrian Lopez
Adrian Lopez

Reputation: 2877

SOLUTION

I solved it reinstalling virtualenv. Thanks to Klaus D.

ALTERNATIVE SOLUTION

If everything else fail, you can still use pip explicitly:

myvirtualenv/bin/pip3 install django==1.7.1

and when you create your virtualenv do it without sudo, like:

virtualenv myvirtualenv --no-site-packages

Thanks to cesarkawakami from #python freenode irc.

Upvotes: 1

Related Questions