Virtual Environments
Installing Virtualenv¶
Assuming python 3 it is already installed as well as pip
we can start in this way:
Creating the Virtual Environment¶
Now we can select the directory where we are going to save the virtual environment, in this example we will use the directory "/Users/victoraguirre/Documents/026.workspace_Python", and we can provide a name for it ( virtual environment), in this case i will choose virtualEnv000
Activate environments¶
now a Folder with the name of the environment it is going to be created, the first step to activate the environment will be to navigate to that folder
and later call the activate
file that is inside the bin
directory
As part of this exercise I will install Flask inside this virtual environment
Install packages and create a file¶
now lets install flask
here the basic code for a page in flash
now running
we have the server running ans the website up ( default IP http://127.0.0.1:5000)
Deactivate environment¶
Now, to stop the environment we just need to type deactivate