To use this new Python virtual environment, we have to activate it, so let’s go back to the command prompt and type the following:
env_mysite\scripts\activate
This will run the activate script inside your virtual environment’s
\scripts
folder. You will notice your command prompt has now changed:(env_mysite) C:\Users\Nigel\OneDrive\Documents\mysite_project>
The
(env_mysite)
at the beginning of the command prompt lets you know that you are running in the virtual environment. Our next step is to install Django.
Apparently, this is how it goes in Windows. In Linux, we would have to do the following:
source bin/activate
And then we can see:
boris@boris-D630:~/workspace/mysite_project/env_mysite$ source bin/activate
(env_mysite)boris@boris-D630:~/workspace/mysite_project/env_mysite$
ref:
https://pypi.python.org/pypi/virtualenv/1.8.2
No comments:
Post a Comment