m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/python.md
blob: 41b202e349ecc6dcdadeedf79b0d33a7341ae74a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Python

## Virtual Envs

Create:

    python3 -m venv <env name>

Run:

    source <env name>/bin/activate

### requirements.txt

Create based on currently installed packages:

    pip freeze > requirements.txt

Install from requirements:

    python -m pip install -r requirements.txt

### Jupyter Notebook

Setting default browser:

    # generates a config file under ~/.jupyter/
    jupyter notebook --generate-config
    # edit the newly generated config
    c.NotebookApp.browser = '<browser command> %s'