Project

General

Profile

View metrics with jupyterlab » History » Version 3

Ron Rechenmacher, 10/02/2019 12:15 PM

1 1 Ron Rechenmacher
h1. View metrics with jupyterlab
2 1 Ron Rechenmacher
3 1 Ron Rechenmacher
<pre>
4 1 Ron Rechenmacher
setup python v2_7_15a            # optional
5 1 Ron Rechenmacher
pip install --user virtualenv    # optional
6 1 Ron Rechenmacher
pip install --user jupyter\>5.0
7 1 Ron Rechenmacher
virtualenv blah          # blah is a name you give to your virtual environment
8 1 Ron Rechenmacher
export PATH=$HOME/.local/bin:$PATH
9 1 Ron Rechenmacher
</pre>
10 1 Ron Rechenmacher
11 1 Ron Rechenmacher
h1. Install  Jupyterlab on mu2edaq
12 1 Ron Rechenmacher
13 1 Ron Rechenmacher
h3. Setup python
14 1 Ron Rechenmacher
15 1 Ron Rechenmacher
<pre>
16 1 Ron Rechenmacher
source /mu2e/ups/setup
17 1 Ron Rechenmacher
setup python v2_7_14b
18 1 Ron Rechenmacher
</pre>
19 1 Ron Rechenmacher
20 1 Ron Rechenmacher
21 1 Ron Rechenmacher
22 1 Ron Rechenmacher
h3. Install python virtualenv
23 1 Ron Rechenmacher
24 1 Ron Rechenmacher
25 1 Ron Rechenmacher
<pre>
26 1 Ron Rechenmacher
pip install --user virtualenv
27 1 Ron Rechenmacher
</pre>
28 1 Ron Rechenmacher
29 1 Ron Rechenmacher
30 1 Ron Rechenmacher
31 1 Ron Rechenmacher
32 1 Ron Rechenmacher
h3. Modify PATH and LD_LIBRARY_PATH
33 1 Ron Rechenmacher
34 1 Ron Rechenmacher
35 1 Ron Rechenmacher
<pre>
36 1 Ron Rechenmacher
export PATH=$HOME/.local/bin:$PATH
37 1 Ron Rechenmacher
export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH
38 1 Ron Rechenmacher
</pre>
39 1 Ron Rechenmacher
40 1 Ron Rechenmacher
41 1 Ron Rechenmacher
42 1 Ron Rechenmacher
43 1 Ron Rechenmacher
h3. Create new virtual env, activate it, and install jupyterlab
44 1 Ron Rechenmacher
45 1 Ron Rechenmacher
<pre>
46 2 Ron Rechenmacher
virtualenv my_new_env                 # create virtualenv in your $HOME
47 2 Ron Rechenmacher
du -sck $HOME/my_new_env              # see how much crap go installed -- should only be about 14 MB
48 2 Ron Rechenmacher
source $HOME/my_new_env/bin/activate  # deactivate will... deactivate
49 2 Ron Rechenmacher
pip install jupyterlab                # takes many minutes, installs "a lot of stuff"
50 1 Ron Rechenmacher
</pre>
51 2 Ron Rechenmacher
52 1 Ron Rechenmacher
h3. Start jupyterlab
53 1 Ron Rechenmacher
54 1 Ron Rechenmacher
55 1 Ron Rechenmacher
<pre>
56 3 Ron Rechenmacher
# next 3 lines if fresh login
57 1 Ron Rechenmacher
source /mu2e/ups/setup
58 1 Ron Rechenmacher
setup python v2_7_14b
59 1 Ron Rechenmacher
source $HOME/my_new_env/bin/activate
60 3 Ron Rechenmacher
61 1 Ron Rechenmacher
jupyter-lab --no-browser
62 1 Ron Rechenmacher
# then copy the URL from the terminal and open it in the browser of your choice
63 1 Ron Rechenmacher
</pre>