m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2021-07-30 19:42:25 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2021-07-30 19:42:25 +0200
commit702cad966cdcb7f99dce3541a6c9e269b200b7c3 (patch)
tree3f90d2d0d54c76b02ed8e77ea0a23f84b0f51184
parent10bf9fc971f2ca1982512beebb4bae5df1af15af (diff)
Add some new python stuff
-rw-r--r--python.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/python.md b/python.md
index 41b202e..0dca522 100644
--- a/python.md
+++ b/python.md
@@ -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