Python Virtual Environment
To install Python Virtual Environment on your machine, follow the following instructions:
On Windows,
In Windows PowerShell, go to the robustest folder
Run the following commands
easy_install pipYou can obtain the latest version of pip by running the command
pip install --upgrade pipIf you face any permission issues then run the following command:
pip install --user —upgrade pip
Run the following commands
pip install --user virtualenv
py -m v env virtualenv
.\virtualenv\Scripts\activate(to activate virtualenv)
If you get an error message stating that you are unable to run a script, then run the following command on PowerShell
Set-ExecutionPolicy RemoteSignedand hit EnterType A and hit Enter
Now run the activate command above
pip install -r requirements.txt
The requirements.txt file will be available within the robustest folder
deactivateCreate the VIRT_ENV environment variable
In the Windows Search bar, search using the string ‘env’
Click on the option ‘Edit the system environment variables’
Click on the button ‘Environment Variables’
Under the section ‘User Variables’, click on the button ‘New’
Enter VIRT_ENV in the ‘Variable name’ field
Enter the path to the robustestvirtualenv folder in the ‘Variable value’ field. This is usually of the form C:\\Users<username>\robustest\virtualenv
Go to the folder ~/robustest/virtualenv and rename the folder ‘Scripts’ to ‘bin’
For Mac and Linux,
On the terminal, go to the robustest folder
Run the following commands
easy_install pippip install virtualenvvirtualenv virtualenvsource ~/robustest/virtualenv/bin/activatepip install -r requirements.txtThe requirements.txt file will be available within the robustest folder
deactivate