diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-07-30 19:42:25 +0200 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-07-30 19:42:25 +0200 |
commit | 702cad966cdcb7f99dce3541a6c9e269b200b7c3 (patch) | |
tree | 3f90d2d0d54c76b02ed8e77ea0a23f84b0f51184 | |
parent | 10bf9fc971f2ca1982512beebb4bae5df1af15af (diff) |
Add some new python stuff
-rw-r--r-- | python.md | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -20,7 +20,13 @@ Install from requirements: python -m pip install -r requirements.txt -### Jupyter Notebook +## Executing a package + +Create `./package/__main__.py` script you want to execute. Then + + python -m package + +## Jupyter Notebook Setting default browser: @@ -28,3 +34,10 @@ Setting default browser: jupyter notebook --generate-config # edit the newly generated config c.NotebookApp.browser = '<browser command> %s' + +Using a venv: + + # once in venv + pip install ipykernel + python -m ipykernel install --user --name <name for the env in Jupyter> + # then select the new kernel in the web app |