|
@@ -21,17 +21,17 @@ import labkeyInterface
|
|
|
|
|
|
Create virtualenv called `nix` where we will use nixWrapper:
|
|
Create virtualenv called `nix` where we will use nixWrapper:
|
|
```bash
|
|
```bash
|
|
-#: cd $HOME
|
|
|
|
-#:~$ mkdir venv
|
|
|
|
-#:~$ cd venv
|
|
|
|
-#:~/venv$ virtualenv -p python3 nix
|
|
|
|
-#:~/venv$ . ./nix/bin/activate
|
|
|
|
|
|
+:~$ cd $HOME
|
|
|
|
+:~$ mkdir venv
|
|
|
|
+:~$ cd venv
|
|
|
|
+:~/venv$ virtualenv -p python3 nix
|
|
|
|
+:~/venv$ . ./nix/bin/activate
|
|
(nix) $:~/venv$ cd
|
|
(nix) $:~/venv$ cd
|
|
(nix) $:~$ pip install nixWrapper
|
|
(nix) $:~$ pip install nixWrapper
|
|
```
|
|
```
|
|
Whenever you need `nixWrapper` in your code, simply run:
|
|
Whenever you need `nixWrapper` in your code, simply run:
|
|
```bash
|
|
```bash
|
|
-#: ~/venv/nix/python3 yourScript.py
|
|
|
|
|
|
+:~$ ~/venv/nix/python3 yourScript.py
|
|
```
|
|
```
|
|
where in your script `yourScript.py` you use nixWrapper directly like in Usage section.
|
|
where in your script `yourScript.py` you use nixWrapper directly like in Usage section.
|
|
|
|
|
|
@@ -40,9 +40,9 @@ where in your script `yourScript.py` you use nixWrapper directly like in Usage s
|
|
To integrate `nixWrapper` installed in virtualenv with your jupyter code, jupyter needs
|
|
To integrate `nixWrapper` installed in virtualenv with your jupyter code, jupyter needs
|
|
to be aware of virtualenv. To do that:
|
|
to be aware of virtualenv. To do that:
|
|
```bash
|
|
```bash
|
|
-#~$: . ~/venv/nix/bin/activate
|
|
|
|
-(nix) #:~$ pip install ipykernel
|
|
|
|
-(nix) #:~$ python -m ipykernel install --user --name=nix
|
|
|
|
|
|
+:~$ . ~/venv/nix/bin/activate
|
|
|
|
+(nix) :~$ pip install ipykernel
|
|
|
|
+(nix) :~$ python -m ipykernel install --user --name=nix
|
|
Installed kernelspec nix in /home/<your name>/.local/share/jupyter/kernels/nix
|
|
Installed kernelspec nix in /home/<your name>/.local/share/jupyter/kernels/nix
|
|
```
|
|
```
|
|
More info [here][venvJupyter].
|
|
More info [here][venvJupyter].
|