Virtual environment on Windows

From Kraken Wiki
Revision as of 16:20, 30 March 2022 by Ville Valtavirta (talk | contribs) (Created page with "Get Python 3.8 from the Python website (executable installer for Windows). During installation, tick the box for "add Python 3.8 to PATH" and take note of the installation loc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Get Python 3.8 from the Python website (executable installer for Windows). During installation, tick the box for "add Python 3.8 to PATH" and take note of the installation location.

Also choose "Disable path length limit" if prompted.

Check

Open a command propmt and run

python
>>> import sys
>>> print(sys.executable)

and make sure that the location of the Python executable is the same you noted down during the installation.

Virtual environment

Open a command prompt and run

python3.8 -m pip install virtualenv
python3.8 -m pip install virtualenvwrapper-win

(Close the command prompt and open a new one.)

mkvirtualenv kraken
python3.8 -m virtualenv kraken

After this the following commands should work

workon kraken
<... do some work in the environment ...>
deactivate