notes/cmd/python
Sander Hautvast b832dfc38c
Update python
2024-05-08 13:30:30 +02:00

18 lines
396 B
Text

## New python project with virtual env in ZED
* create $PROJECT `mkdir project; cd project`
* create `python -m venv .venv`
* activate `source .venv/bin/activate`
* create pyrightconfig.json
```bash
echo '{ "venvPath": ".", "venv": ".venv"}' >pyrightconfig.json
```
* `pip install ...`
* `zed .`
* to quit the venv: `deactivate`
* generate requirements.txt
pip3 freeze > requirements.txt