Thursday, March 31, 2022

[SOLVED] Python and Virtualenv on Windows

Issue

How do you install virtualenv correctly on windows?

I downloaded virtualenv1.9.1 from here and tried installing it with:

python virtualenv.py install

but it does not appear in MyPythonPath/Scripts

I tried the same way installing virutalenvwrapper-win and it installed correctly. But I can't use it because I don't have virtualenv

python.exe: can't open file 'MyPythonPath\Scripts\virtualenv-script.py': [Errno 2 ] No such file or directory


Solution

The suggested way to install Python packages is to use pip

Please follow this documentation to install pip: https://pip.pypa.io/en/latest/installing/

Note: Python 2.7.9 and above, and Python 3.4 and above include pip already.

Then install virtualenv:

pip install virtualenv


Answered By - woozyking
Answer Checked By - Willingham (WPSolving Volunteer)