How To Set Up A Python Virtual Environment On Windows 10 | Liquid Web
Step 3. Install Virtualenv
In your Windows command shell prompt type in:
pip install virtualenvStart virtualenv
In your windows command prompt, head to your project location:
cd my_projectOnce inside the project folder run:
virtualenv envpython3 -m venv venv
Activate virtualenv
On Windows, virtualenv (venv) creates a batch file called
\env\Scripts\activate.batTo activate virtualenv on Windows, and activate the script is in the Scripts folder :
\pathto\env\Scripts\activateExample:
C:\Users\'Username'\venv\Scripts\activate.batStep 4. Install VirtualEnvWrapper-win
There are two main methods we recommend to install this batch script.
- Using pip
pip install virtualenvwrapper-win- Install from source
git clone git://github.com/davidmarble/virtualenvwrapper-win.gitWe then cd to the virtualenvwrapper-win folder and run:
python setup.py install And that’s it! Python’s venv is set up and ready to use.
Không có nhận xét nào:
Đăng nhận xét