[PYTHON] Use pyvenv on Windows

Introduction

When I participated in Python Mokumokukai @ Allied Architects (Ebisu), a kind person told me "I want to use pyenv", so make a note.

At that time, I didn't know the difference between pyenv, pyvenv, and virtualenv Because it was a statement in the state, that kind person is also a beginner. I don't know if you're saying the right thing, but after prefaced, say "If you have only one purpose, you don't need virtualenv" and "You probably want to do virtualenv" and teach the following method. Gave me.

After listening to the story and actually working on it, I realized that my remarks were quite mysterious, and today (2015/04/11) I realized that it was pyvenv who taught me more.

environment

How to use pyvenv for Windows

1. Move to the folder where you want to create a project.

For example

C:\> cd C:\Users\username\Documents

2. Run pyvenv.py

C:\Users\username\Documents> Python C:\Python34\Tools\Scripts\pyvenv.py venvtest

(Added on 2015/04/13) Mr. shimizukawa commented that pyvenv is made to be executable as a python module, so you can get the same result with the following command.

C:\Users\username\Documents> python -m venv venvtest

3. Activate the environment

C:\Users\username\Documents\venvtest\Scripts\activate

(After activate)

(venvtest)C:\Users\username\Documents>

4. Deactivate the environment

(Mr. Thanks to furico revised on May 10, 2015)

(venvtest)C:\Users\username\Documents> deactivate

(After deactivate)

C:\Users\username\Documents>

Reference URL

https://docs.python.org/3/library/venv.html#module-venv http://docs.python.jp/3.3/library/venv.html

Special Thanks Python Mokumokukai @ Allied Architects (Ebisu) python mini-hack-a-thon

Recommended Posts

Use pyvenv on Windows
Use Ansible on Windows
Use QuTiP on Windows
Use pip on Windows
Use Python on Windows (PyCharm)
Use Linux on Windows 10 (WSL2)
How to use Dataiku on Windows
Use Tensorflow 2.1.0 with Anaconda on Windows 10!
Python on Windows
How to use Google Assistant on Windows 10
Use without installing python 2.x on Windows
Pylint on Windows Atom
Linux (WSL) on Windows
Anaconda on Windows Terminal
Install Anaconda on Windows 10
python basic on windows ②
Install python on windows
Install pycuda on Windows10
Build TensorFlow on Windows
Try FEniCS on Windows!
Build XGBoost on Windows
Install pygraphviz on Windows 10
Try Poerty on Windows
Install Chainer 1.5.0 on Windows
[Windows] Memo to use Keras on GPU [Tensorflow-GPU]
Install Numpy on virtualenv on Windows
Set-enable Python virtualenv on Windows
Run Jupyter on Ubuntu on Windows
Run Openpose on Python (Windows)
Use matplotlib on Ubuntu 12 & Python
Install watchdog on Windows + Python 3.3
Install Win-Kex (kali-linux) on Windows 10.
Use music21 on Google Colaboratory
Before trying Veriloggen on Windows
Install cvxpy on windows, Anaconda
Python + Kivy development on Windows
Prepare Chainer environment on Windows
Use Github Desktop on Linux
Try using OpenCV on Windows
F2py on Miniconda for Windows
Sphinx-autobuild (0.5.2) on Windows7, Python 3.5.1, Sphinx 1.3.5
Use Windows 10 fonts with WSL
Make Cython available on Windows.
Fastest Python installation on Windows
Operate ubuntu on VScode (windows10)
Build Python environment on Windows
Django environment development on Windows 10
Install Chainer 1.6 (GPU) on Windows 7.
Build python environment on windows
Set up Polyglot on Windows
Linux on Windows -1-: debian introduction
Use matplot libwidget on mac
Use sshpass on Amazon linux2
I ran python on windows
[Tensorflow] Tensorflow environment construction on Windows 10
Notes on installing Anaconda 3 on Windows
[Python] [Chainer] [Windows] Install Chainer on Windows
Run Jupyter Notebook on windows
Use NeoPixel on Raspberry Pi
Blogging with Pelican on Windows
How to use VS Code in venv environment on windows