I installed django using
我用django安装了
"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 ?
进入虚拟环境后。所以在我退出虚拟环境之后,我不应该能够访问django,对吗?但我仍然可以从环*访问django。是什么原因 ?我正在使用ubuntu?我所知道的是,我们在里面安装的任何内容都只会被本地化到特定的虚拟环境,一旦我们删除了那个特定的文件夹,它们就会被删除.Occouse我没有删除那个文件夹,但我认为它应该可以在环境之外访问,但访问那,什么是正确的?
1 个解决方案
#1
1
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.
virtualenv依赖于在环境中设置各种事物。使用sudo将改变环境,这可能是Django单独安装的方式。您或其他用户也可能已在您的系统上的其他位置安装了Django。
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.
无论如何,在virtualenv中进行pip安装时不要使用sudo,这是不必要的,并且可能由于路径而导致意外事情发生。
#1
1
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.
virtualenv依赖于在环境中设置各种事物。使用sudo将改变环境,这可能是Django单独安装的方式。您或其他用户也可能已在您的系统上的其他位置安装了Django。
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.
无论如何,在virtualenv中进行pip安装时不要使用sudo,这是不必要的,并且可能由于路径而导致意外事情发生。