# Python set up
Install python .. duh
verify installed
cmd> `python --version`
verify py package manager installed also
cmd> `pip --version`
create a project folder and open in vis code
cmd> `code .`
Navigate to the dir first
Add rich support for Py in vsCode
create .py file in the dir
----
Virtual Environment
used for installing packages local to a particular python project - use different versions etc for different projects. Ultimately prevent conflicts
Use terminal, nav to the projects workspace
cmd> `python -m venv {name of venv}`
cmd> `.\{name of venv}\scripts\activate`
this runs a bat created via last command
> [!failure] Running scripts in cmd
This might get blocked due to policy to prevent running scripts in cmd [[Windows - Enable running scripts in cmd]]
Your cmd should be prefixed with ({name of venv)})
![[Pasted image 20250209180847.png]]
pip install your packages
(venv) cmd> `pip install numpi`
Select the venv in vsCode to run code with that venv
Should be able to see reference to venv in status bar of vsCode bot right
(venv) cmd> `deactivate`
to exit venv