ramesh kumar
ramesh kumar

Reputation: 1707

virtualenvironment - installed django inside virtualenv, but able to access it from outside env, but it shouldnt happen

I installed django using

                 "sudo pip install django"

after entering into the virual environment . So after i exit virtualenvironment, i shouldnot be able to access django , right ? but i am still be able to access django from outside the environment . What is the reason ? i am using ubuntu ? What i know is, whatever we install inside will be localised to that particular virutal environment only and they will be deleted once we delete that particular folder.Ofcouse i didnt delete that folder, but i think it should be accessible outside the environement, but accessing that , what is correct ?

Upvotes: 1

Views: 194

Answers (1)

Hamish Downer
Hamish Downer

Reputation: 17067

virtualenv relies on setting various things in the environment. Using sudo will change the environment, which may be how Django came to be installed separately. It's also possible that you or another user has already installed Django elsewhere on your system.

At any rate, don't use sudo when doing pip install inside a virtualenv, it is unnecessary and may cause unexpected things to happen due to paths.

Upvotes: 1

Related Questions