This is HOW to create a Python Virtual Environment in VS Code with Venv

preview_player
Показать описание
Virtual environments are the way to go when you want to build scalable projects which are easy to transfer. A virtual environment allows you to use a different Python version for different projects, and different dependencies. You can run Python version 3.11 global, and for example Python 3.8 in your venv - with different versions of selenium.

⭐️ All the terminal commands I use⭐
python -m venv .venv
.venv\Scripts\Activate
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force

⭐️ Follow me ⭐

❗ Some of my videos contain affiliate links. When you click on these kind of links, I get a small percentage in case you make a purchase via the website. Be aware that this doesn't cost you anything - you never pay more than the standard retail price.

#python #virtualenv #virtualenvironment
Рекомендации по теме
Комментарии
Автор

Doesn't it automatically enter the virtual environment once the interpreter is selected as .venv without the "activate" step?

ethanf.
Автор

only guide that worked for me thankyou very much

ralphlewis
Автор

very comprehensive guide!, thank you!

chingquilee
Автор

Thank you. I was struggling to get to my venv

IgbajiBarnabasObande
Автор

will this work if i send the folder to someone else to run my projects?

fifty
Автор

Didn't work for me at all. I seem to be outputting python commands to a separate terminal to you. Nvm, will just use the cmd prompt to set up my virtual environments...imo VS code is truely awful. Thanks for the video though.

andvad