Python Virtual Environment

Python should already be installed. Here we are using Python3. In VS Code, open the terminal, and run the script to create a folder for the Virtual Environment setup.

Create Virtual Environment

Script Explanation Script
name of a virtual environment Python
makes virtual environment -m
execute building virtual environment venv
name of virtual environment .venv
Break down of script.
python -m venv .venv

Activate Virtual Environment

Once the folder has been created, then "Activate" the Virtual Environment.

For PC
.venv/Scripts/activate
For MAC
.venv/bin/activate

If started properly, the following notation should appear (.venv)

Deactivate Virtual Environment

If you need to deactivate VE, type the following code.

deactivate

Supplemental

Upgrading PIP in Virtual Environment

Just from my experience, the virtual environment is very useful, but it also presents some unique challenges as well. But it's normally insignificant. Note: To call python, you can use python or py.

py -m pip install --upgrade pip

Contact Us

Thank you for taking the time to learn about us. If you have any questions, or comments, or would like to discuss how we can assist you, please don't hesitate to reach out to our team. We are here to help and look forward to hearing from you.
65 Sukhumvit 93 Bangkok, 10260 Thailand 
+66-85-228-6722

Contact Form

envelope