If you don't want to use Anaconda, virtualenv needs to be installed first. Use the following command to install it locally:
>> pip install virtualenv
Next, a virtual environment can be created by assigning with the virtualenv command followed by the name of the new environment, for example:
>> virtualenv python3packt
Navigate to the directory with the same name:
>> cd python3packt
Next, activate the virtual environment with the activate command:
>> activate
Your virtual environment is now ready for use. Use pip install to install packages exclusively to this environment and use them in your code. Use the deactivate command to stop the virtual environment from working:
>> deactivate
If you have multiple Python versions installed, use the argument -p together with the desired Python version or path to the python.exe file of your choice, for example:
>> -p python2.7
You can also do it as follows:
>> -p c:\python34\python.exe
This step follows creation of the virtual environment and precedes installation of the required packages. For more information on virtualenv, see: http://virtualenv.readthedocs.io/en/stable