1. Python Setup
1.1. Install Python
Check the version of python installed from the command line.
python --version
Download and install Python from https://www.python.org/downloads/.
1.2. Create a python Virtual environment
C:\Users\username\
.venv_rtd
, but any suitable name can be used.python -m venv venv_rtd
C:\Users\username\AppData\Local\Programs\Python\Python311\python.exe
"C:\Users\username\AppData\Local\Programs\Python\Python311\python.exe" -m venv venv_rtd
1.3. Activate a python Virtual environment
"C:\Users\username\venv_rtd\Scripts\activate.bat"
1.4. Using the python Virtual environment in VSCode
Choose View: Command Palette.
Into the drop down search field, type: Python : Select Interpreter
Choose the one listed that refers to the newly created venv_rtd.
1.5. Updating pip
python.exe -m pip install --upgrade pip
1.6. Installing packages
To install a package such as pillow, check the output from typing in the VSCode terminal:
pip install pillow
To check the installed version numbers and other info about a package, such as pillow, check the output from typing in the VSCode terminal:
pip show pillow
1.7. Updating packages
To update installed packages, such as pillow, to the latest version, run pip install with the –upgrade or -U option.
pip install --upgrade pillow
1.8. List installed packages
To get all the installed version numbers, check the output from typing in the VSCode terminal:
pip list
To see if there are updates available, check the output from typing one of these in the VSCode terminal:
pip list -o
pip list --outdated