m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/python.md
diff options
context:
space:
mode:
Diffstat (limited to 'python.md')
-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