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

20 lines
408 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
```bash
pip3 freeze > requirements.txt
```