How install Python 3 and setup Virtual Environment in Windows The the next sections we will repeat the same but now by using only Windows 10. (frameworkenv) :/mnt/c/Users/ruslamv/myproject1$Ĭongratulations ! Now we can work on VS code with your custom python environment. (frameworkenv) :/mnt/c/Users/ruslamv/myproject1$ python3 hello.py (frameworkenv) :/mnt/c/Users/ruslanmv/myproject1$ source "./environments/frameworkenv/bin/activate" While there are a few ways to achieve a programming environment in Python, we’ll be using the venv module here, which is part of the standard Python 3 library. Each environment is basically a directory or folder on your server that has a few scripts in it to make it act as an environment. You can set up as many Python programming environments as you would like. This is especially important when working with third-party packages. Setting up a programming environment provides greater control over Python projects and over how different versions of packages are handled.
Virtual environments enable you to have an isolated space on your server for Python projects, ensuring that each of your projects can have its own set of dependencies that won’t disrupt any of your other projects.
Install pip for python 2.7 ubuntu how to#
How to setup Virtual Environment in Windows Subsystem for Linux (WSL) Once Python is set up, and pip and other tools are installed, we can set up a virtual environment for our development projects.
Sudo apt install -y build-essential libssl-dev libffi-dev python3-dev You can now install everything you need to run Windows Subsystem for Linux (WSL) by entering this command in an administrator PowerShell or Windows Command Prompt and then restarting your machine. Installing Linux distros using PowerShell