kleinee / jns

jupyter notebook and lab on Raspberry Pi
MIT License
235 stars 56 forks source link

conf_jupyter.sh issue #23

Closed gusdrawn closed 6 years ago

gusdrawn commented 6 years ago

Hello, Kleinee

When Execute I have this issue, why?

pi@raspberrypi:~/jns$ ./conf_jupyter.sh Writing default config to: /home/pi/.jupyter/jupyter_notebook_config.py /home/pi/.venv/jns/bin/python3: Error while finding module specification for 'bash_kernel.install' (ImportError: No module named 'bash_kernel') Traceback (most recent call last): File "/usr/local/bin/jupyter-serverextension", line 11, in sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 266, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, kwargs) File "/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py", line 658, in launch_instance app.start() File "/usr/local/lib/python3.5/dist-packages/notebook/serverextensions.py", line 294, in start super(ServerExtensionApp, self).start() File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 255, in start self.subapp.start() File "/usr/local/lib/python3.5/dist-packages/notebook/serverextensions.py", line 211, in start self.toggle_server_extension_python(arg) File "/usr/local/lib/python3.5/dist-packages/notebook/serverextensions.py", line 200, in toggle_server_extension_python m, server_exts = _get_server_extension_metadata(package) File "/usr/local/lib/python3.5/dist-packages/notebook/serverextensions.py", line 328, in _get_server_extension_metadata m = import_item(module) File "/usr/local/lib/python3.5/dist-packages/traitlets/utils/importstring.py", line 42, in import_item return import(parts[0]) ImportError: No module named 'jupyterlab' Enabling notebook extension jupyter-js-widgets/extension... Traceback (most recent call last): File "/usr/local/bin/jupyter-nbextension", line 11, in sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 266, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, kwargs) File "/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py", line 658, in launch_instance app.start() File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 988, in start super(NBExtensionApp, self).start() File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 255, in start self.subapp.start() File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 896, in start self.toggle_nbextension_python(self.extra_args[0]) File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 872, in toggle_nbextension_python logger=self.log) File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 483, in enable_nbextension_python logger=logger) File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 386, in _set_nbextension_state_python for nbext in nbexts] File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 386, in for nbext in nbexts] File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 351, in _set_nbextension_state cm.update(section, {"load_extensions": {require: state}}) File "/usr/local/lib/python3.5/dist-packages/notebook/config_manager.py", line 136, in update self.set(section_name, data) File "/usr/local/lib/python3.5/dist-packages/notebook/config_manager.py", line 110, in set self.ensure_config_dir_exists() File "/usr/local/lib/python3.5/dist-packages/notebook/config_manager.py", line 67, in ensure_config_dir_exists os.makedirs(self.config_dir, 0o755) File "/usr/lib/python3.5/os.py", line 231, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib/python3.5/os.py", line 231, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib/python3.5/os.py", line 241, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/usr/etc' Traceback (most recent call last): File "/usr/local/bin/jupyter-nbextension", line 11, in sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 266, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py", line 658, in launch_instance app.start() File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 988, in start super(NBExtensionApp, self).start() File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 255, in start self.subapp.start() File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 896, in start self.toggle_nbextension_python(self.extra_args[0]) File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 872, in toggle_nbextension_python logger=self.log) File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 483, in enable_nbextension_python logger=logger) File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 380, in _set_nbextension_state_python m, nbexts = _get_nbextension_metadata(module) File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 1122, in _get_nbextension_metadata m = import_item(module) File "/usr/local/lib/python3.5/dist-packages/traitlets/utils/importstring.py", line 42, in import_item return import(parts[0]) ImportError: No module named 'bqplot' ./conf_jupyter.sh: line 59: /home/pi/.venv/jns/bin/ipcluster: No such file or directory node is installed, skipping... Error executing Jupyter command 'lab': [Errno 2] No such file or directory Error executing Jupyter command 'labextension': [Errno 2] No such file or directory Error executing Jupyter command 'labextension': [Errno 2] No such file or directory Error executing Jupyter command 'labextension': [Errno 2] No such file or directory pi@raspberrypi:~/jns$

Kevin--R commented 6 years ago

@gusdrawn

I just did a complete install on an SD card that was just re-imaged with the newest image of Raspbian Stretch Lite (dated 2018-04-18).

I didn't see the errors you posted. This is the output I get when I run ./conf_jupyter.sh:

pi@test-pi:~/jns $ ./conf_jupyter.sh
Writing default config to: /home/pi/.jupyter/jupyter_notebook_config.py
Installing IPython kernel spec
Enabling: jupyterlab
- Writing config: /home/pi/.jupyter
    - Validating...
      jupyterlab 0.32.1 OK
Enabling notebook extension jupyter-js-widgets/extension...
      - Validating: OK
Enabling notebook extension bqplot/extension...
      - Validating: OK
Enabling IPython clusters tab
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 38002  100 38002    0     0  69645      0 --:--:-- --:--:-- --:--:--  259k
-- Cloning https://github.com/tj/n to '/home/pi/n/n/.repo'...
-- Running local n installation to '/home/pi/n/bin'...
-- Shell initialization file '/home/pi/.bashrc' updated.
-- Installing helper scripts in '/home/pi/n/bin'...
-- Installing the requested Node.js version(s)...
   1 of 2: lts...

     install : node-v8.11.2
       mkdir : /home/pi/n/n/versions/node/8.11.2
       fetch : https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-armv7l.tar.gz
######################################################################## 100.0%
   installed : v8.11.2

   2 of 2: latest...

     install : node-v10.2.1
       mkdir : /home/pi/n/n/versions/node/10.2.1
       fetch : https://nodejs.org/dist/v10.2.1/node-v10.2.1-linux-armv7l.tar.gz
######################################################################## 100.0%
   installed : v10.2.1

=== n successfully installed.
  The active Node.js version is: v8.11.2

  Run `n -h` for help.
  To update n later, run `n-update`.
  To uninstall, run `n-uninstall`.

  IMPORTANT: OPEN A NEW TERMINAL TAB/WINDOW or run `. /home/pi/.bashrc`
             before using n and Node.js.
===

Errored, use --debug for full output:
ValueError: Please install nodejs 5+ and npm before continuing. nodejs may be installed using conda or directly from the nodejs website.

Errored, use --debug for full output:
ValueError: Please install nodejs 5+ and npm before continuing. nodejs may be installed using conda or directly from the nodejs website.

Errored, use --debug for full output:
ValueError: Please install nodejs 5+ and npm before continuing. nodejs may be installed using conda or directly from the nodejs website.
pi@test-pi:~/jns $ 

@gusdrawn Are you sure you haven't skipped any of the steps before running ./conf_jupyter.sh?

The three errors at the bottom are caused the last 3 lines in conf_jupyter.sh. These errors occur because the path to the node executable (/home/pi/n/bin) is not in the environment path when these 3 lines are called (so it appears that node is not installed).

This is referenced in issue #22 (and/or issue #16).

gusdrawn commented 6 years ago

The first time fail. So I try again (new commit) and Fail. My version es Raspbian Stretch. So, I try to uninstall nodejs with:

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - sudo apt install -y nodejs

Y execute again with sudo ./inst_jns.sh But no work.

Let me get an Fresh Instalation again to night, and I will tell about that.

kleinee commented 6 years ago

Hi @gusdrawn and @Kevin--R,

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt install -y nodejs

Hope this helps.

Eckhard

kleinee commented 6 years ago

Here is the output of my first attempt:

pi@four:~/jns $ ./conf_jupyter.sh 
Writing default config to: /home/pi/.jupyter/jupyter_notebook_config.py
Installing IPython kernel spec
Enabling: jupyterlab
- Writing config: /home/pi/.jupyter
    - Validating...
      jupyterlab 0.32.1 OK
Enabling notebook extension jupyter-js-widgets/extension...
      - Validating: OK
Enabling notebook extension bqplot/extension...
      - Validating: OK
Enabling IPython clusters tab
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 38002  100 38002    0     0  17299      0  0:00:02  0:00:02 --:--:-- 17299
-- Cloning https://github.com/tj/n to '/home/pi/n/n/.repo'...
-- Running local n installation to '/home/pi/n/bin'...
-- Shell initialization file '/home/pi/.bashrc' updated.
-- Installing helper scripts in '/home/pi/n/bin'...
-- Installing the requested Node.js version(s)...
   1 of 2: lts...

     install : node-v8.11.2
       mkdir : /home/pi/n/n/versions/node/8.11.2
       fetch : https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-armv7l.tar.gz
######################################################################## 100.0%
   installed : v8.11.2

   2 of 2: latest...

     install : node-v10.2.1
       mkdir : /home/pi/n/n/versions/node/10.2.1
       fetch : https://nodejs.org/dist/v10.2.1/node-v10.2.1-linux-armv7l.tar.gz
######################################################################## 100.0%
   installed : v10.2.1

=== n successfully installed.
  The active Node.js version is: v8.11.2

  Run `n -h` for help.
  To update n later, run `n-update`.
  To uninstall, run `n-uninstall`.

  IMPORTANT: OPEN A NEW TERMINAL TAB/WINDOW or run `. /home/pi/.bashrc`
             before using n and Node.js.
===
> /home/pi/n/bin/npm pack @jupyter-widgets/jupyterlab-manager
jupyter-widgets-jupyterlab-manager-0.35.0.tgz
> node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react-dom@^15.0.0".
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has incorrect peer dependency "react@^15.6.1".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 104.89s.
> node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
$ webpack --config webpack.prod.config.js
Hash: f00859ac7ec7617b797a
Version: webpack 2.7.0
Time: 289973ms
                                 Asset     Size  Chunks                    Chunk Names
        vendor.4ceb43358f0848e97d69.js  1.57 MB       3  [emitted]  [big]  vendor
  912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  [big]  
  674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]         
 fee66e712a8a08eef5805a46892932ad.woff    98 kB          [emitted]         
af7ae505a9eed503f8b8e6982036873e.woff2  77.2 kB          [emitted]         
             0.279ec850a9242db04c85.js   465 kB       0  [emitted]  [big]  
             1.3f0907688140eb64d6ec.js   138 kB       1  [emitted]         @jupyter-widgets/controls
          main.e376409f584fcd6f7920.js  3.01 MB       2  [emitted]  [big]  main
  b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]         
      manifest.883307aa1dadb814590c.js  1.65 kB       4  [emitted]         manifest
         0.279ec850a9242db04c85.js.map  1.35 MB       0  [emitted]         
         1.3f0907688140eb64d6ec.js.map   455 kB       1  [emitted]         @jupyter-widgets/controls
      main.e376409f584fcd6f7920.js.map  11.8 MB       2  [emitted]         main
    vendor.4ceb43358f0848e97d69.js.map  5.69 MB       3  [emitted]         vendor
  manifest.883307aa1dadb814590c.js.map  8.29 kB       4  [emitted]         manifest
                            index.html  1.53 kB          [emitted]         
[/sZe] ./~/@phosphor/commands/lib/index.js 33.3 kB {3} [built]
[2Kj9] ./~/@phosphor/widgets/lib/index.js 1.38 kB {3} [built]
[6nap] ./~/ajv/lib/ajv.js 15.2 kB {3} [built]
[EFqf] ./~/marked/lib/marked.js 32.4 kB {3} [built]
[PJh5] ./~/moment/moment.js 132 kB {3} [built]
[Vszx] ./~/@phosphor/domutils/lib/index.js 636 bytes {3} [built]
[b/Hx] ./~/ansi_up/ansi_up.js 13.6 kB {3} [built]
[cYMN] ./~/@phosphor/virtualdom/lib/index.js 21 kB {3} [built]
[dyOy] ./~/url-parse/index.js 11.4 kB {3} [built]
[ug+F] ./~/xterm/lib/xterm.js 52.7 kB {3} [built]
[wr2+] ./~/@phosphor/properties/lib/index.js 6.58 kB {3} [built]
[wuIn] ./~/comment-json/index.js 103 bytes {3} [built]
[y7VK] ./~/@phosphor/algorithm/lib/index.js 1.03 kB {3} [built]
   [8] multi @phosphor/algorithm @phosphor/application @phosphor/commands @phosphor/coreutils @phosphor/datagrid @phosphor/disposable @phosphor/domutils @phosphor/dragdrop @phosphor/messaging @phosphor/properties @phosphor/signaling @phosphor/virtualdom @phosphor/widgets ajv ansi_up codemirror comment-json es6-promise marked moment path-posix react react-dom sanitize-html url-parse xterm 328 bytes {3} [built]
   [9] multi whatwg-fetch ./build/index.out.js 40 bytes {2} [built]
    + 2372 hidden modules
Child html-webpack-plugin for "index.html":
    [3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
    [DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
    [GTAU] ./~/html-loader!./templates/partial.html 420 bytes {0} [built]
    [M4fF] ./~/lodash/lodash.js 540 kB {0} [built]
    [vxCX] ./~/html-webpack-plugin/lib/loader.js!./templates/template.html 1.41 kB {0} [built]
Done in 299.78s.
> /home/pi/n/bin/npm pack bqplot
bqplot-0.3.6.tgz
> node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has incorrect peer dependency "react@^15.6.1".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react-dom@^15.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 104.99s.
> node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
$ webpack --config webpack.prod.config.js
Hash: 33a0c39708ec423ac531
Version: webpack 2.7.0
Time: 286613ms
                                 Asset     Size  Chunks                    Chunk Names
        vendor.4ceb43358f0848e97d69.js  1.57 MB       3  [emitted]  [big]  vendor
  912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  [big]  
  674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]         
 fee66e712a8a08eef5805a46892932ad.woff    98 kB          [emitted]         
af7ae505a9eed503f8b8e6982036873e.woff2  77.2 kB          [emitted]         
             0.279ec850a9242db04c85.js   465 kB       0  [emitted]  [big]  
             1.3f0907688140eb64d6ec.js   138 kB       1  [emitted]         @jupyter-widgets/controls
          main.29aecfbb9a7eba228260.js  3.01 MB       2  [emitted]  [big]  main
  b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]         
      manifest.d667b0180212e34282f2.js  1.65 kB       4  [emitted]         manifest
         0.279ec850a9242db04c85.js.map  1.35 MB       0  [emitted]         
         1.3f0907688140eb64d6ec.js.map   455 kB       1  [emitted]         @jupyter-widgets/controls
      main.29aecfbb9a7eba228260.js.map  11.8 MB       2  [emitted]         main
    vendor.4ceb43358f0848e97d69.js.map  5.69 MB       3  [emitted]         vendor
  manifest.d667b0180212e34282f2.js.map  8.29 kB       4  [emitted]         manifest
                            index.html  1.53 kB          [emitted]         
[/sZe] ./~/@phosphor/commands/lib/index.js 33.3 kB {3} [built]
[2Kj9] ./~/@phosphor/widgets/lib/index.js 1.38 kB {3} [built]
[6nap] ./~/ajv/lib/ajv.js 15.2 kB {3} [built]
[EFqf] ./~/marked/lib/marked.js 32.4 kB {3} [built]
[PJh5] ./~/moment/moment.js 132 kB {3} [built]
[Vszx] ./~/@phosphor/domutils/lib/index.js 636 bytes {3} [built]
[b/Hx] ./~/ansi_up/ansi_up.js 13.6 kB {3} [built]
[cYMN] ./~/@phosphor/virtualdom/lib/index.js 21 kB {3} [built]
[dyOy] ./~/url-parse/index.js 11.4 kB {3} [built]
[ug+F] ./~/xterm/lib/xterm.js 52.7 kB {3} [built]
[wr2+] ./~/@phosphor/properties/lib/index.js 6.58 kB {3} [built]
[wuIn] ./~/comment-json/index.js 103 bytes {3} [built]
[y7VK] ./~/@phosphor/algorithm/lib/index.js 1.03 kB {3} [built]
   [8] multi @phosphor/algorithm @phosphor/application @phosphor/commands @phosphor/coreutils @phosphor/datagrid @phosphor/disposable @phosphor/domutils @phosphor/dragdrop @phosphor/messaging @phosphor/properties @phosphor/signaling @phosphor/virtualdom @phosphor/widgets ajv ansi_up codemirror comment-json es6-promise marked moment path-posix react react-dom sanitize-html url-parse xterm 328 bytes {3} [built]
   [9] multi whatwg-fetch ./build/index.out.js 40 bytes {2} [built]
    + 2372 hidden modules
Child html-webpack-plugin for "index.html":
    [3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
    [DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
    [GTAU] ./~/html-loader!./templates/partial.html 420 bytes {0} [built]
    [M4fF] ./~/lodash/lodash.js 540 kB {0} [built]
    [vxCX] ./~/html-webpack-plugin/lib/loader.js!./templates/template.html 1.41 kB {0} [built]
Done in 294.95s.
> /home/pi/n/bin/npm pack jupyterlab_bokeh
jupyterlab_bokeh-0.5.0.tgz
> node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react-dom@^15.0.0".
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has incorrect peer dependency "react@^15.6.1".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 102.72s.
> node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
$ webpack --config webpack.prod.config.js
Hash: c124c6ebd54d804d2230
Version: webpack 2.7.0
Time: 300601ms
                                 Asset     Size  Chunks                    Chunk Names
        vendor.4ceb43358f0848e97d69.js  1.57 MB       3  [emitted]  [big]  vendor
  912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  [big]  
  674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]         
 fee66e712a8a08eef5805a46892932ad.woff    98 kB          [emitted]         
af7ae505a9eed503f8b8e6982036873e.woff2  77.2 kB          [emitted]         
             0.279ec850a9242db04c85.js   465 kB       0  [emitted]  [big]  
             1.3f0907688140eb64d6ec.js   138 kB       1  [emitted]         @jupyter-widgets/controls
          main.4350b820f05ea7a015d4.js  3.01 MB       2  [emitted]  [big]  main
  b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]         
      manifest.1bea59719663cda19ac3.js  1.65 kB       4  [emitted]         manifest
         0.279ec850a9242db04c85.js.map  1.35 MB       0  [emitted]         
         1.3f0907688140eb64d6ec.js.map   455 kB       1  [emitted]         @jupyter-widgets/controls
      main.4350b820f05ea7a015d4.js.map  11.8 MB       2  [emitted]         main
    vendor.4ceb43358f0848e97d69.js.map  5.69 MB       3  [emitted]         vendor
  manifest.1bea59719663cda19ac3.js.map  8.29 kB       4  [emitted]         manifest
                            index.html  1.53 kB          [emitted]         
[/sZe] ./~/@phosphor/commands/lib/index.js 33.3 kB {3} [built]
[2Kj9] ./~/@phosphor/widgets/lib/index.js 1.38 kB {3} [built]
[6nap] ./~/ajv/lib/ajv.js 15.2 kB {3} [built]
[EFqf] ./~/marked/lib/marked.js 32.4 kB {3} [built]
[PJh5] ./~/moment/moment.js 132 kB {3} [built]
[Vszx] ./~/@phosphor/domutils/lib/index.js 636 bytes {3} [built]
[b/Hx] ./~/ansi_up/ansi_up.js 13.6 kB {3} [built]
[cYMN] ./~/@phosphor/virtualdom/lib/index.js 21 kB {3} [built]
[dyOy] ./~/url-parse/index.js 11.4 kB {3} [built]
[ug+F] ./~/xterm/lib/xterm.js 52.7 kB {3} [built]
[wr2+] ./~/@phosphor/properties/lib/index.js 6.58 kB {3} [built]
[wuIn] ./~/comment-json/index.js 103 bytes {3} [built]
[y7VK] ./~/@phosphor/algorithm/lib/index.js 1.03 kB {3} [built]
   [8] multi @phosphor/algorithm @phosphor/application @phosphor/commands @phosphor/coreutils @phosphor/datagrid @phosphor/disposable @phosphor/domutils @phosphor/dragdrop @phosphor/messaging @phosphor/properties @phosphor/signaling @phosphor/virtualdom @phosphor/widgets ajv ansi_up codemirror comment-json es6-promise marked moment path-posix react react-dom sanitize-html url-parse xterm 328 bytes {3} [built]
   [9] multi whatwg-fetch ./build/index.out.js 40 bytes {2} [built]
    + 2372 hidden modules
Child html-webpack-plugin for "index.html":
    [3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
    [DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
    [GTAU] ./~/html-loader!./templates/partial.html 420 bytes {0} [built]
    [M4fF] ./~/lodash/lodash.js 540 kB {0} [built]
    [vxCX] ./~/html-webpack-plugin/lib/loader.js!./templates/template.html 1.41 kB {0} [built]
Done in 309.68s.
kleinee commented 6 years ago

@gusdrawn @Kevin--R FURTHER INVESTIGATION

kleinee commented 6 years ago

@gusdrawn @Kevin--R: I plan to remove the automatic installation of node and make the user install node manually - what do you think?

gusdrawn commented 6 years ago

I dont like, because I like the idea to install all things with one script. In my case, I got fresh installation but with Raspbian Stretch Lite and this time It´s works. May be the next time test with Raspbian Stretch Desktop Version and check the errors.

kleinee commented 6 years ago

Thanks for the feedback @gusdrawn!!! I tend to agree. How did you install node? As per your previous post? I just carefully read the related blog post again: It states that this will only work on ARM7 chipsets but I definitely want to cover ARM6 as well. Regards Eckhard

Kevin--R commented 6 years ago

@kleinee @gusdrawn

I have a fix that seems to work.

I have changed conf_jupyter.sh as follows:

#!/bin/bash
# script name:     conf_jupyter.sh
# last modified:   2018/05/29
# sudo:            no

script_name=$(basename -- "$0")
env="/home/pi/.venv/jns"

if [ $(id -u) = 0 ]
then
   echo "usage: ./$script_name"
   exit 1
fi

# activate virtual environment
source $env/bin/activate

# generate config and create notebook directory
# if notebook directory exists, we keep it (-p)
# if configuration file exeists, we overwrite it (-y)

jupyter notebook -y --generate-config
cd $home
mkdir -p notebooks

target=~/.jupyter/jupyter_notebook_config.py

# set up dictionary of changes for jupyter_config.py
declare -A arr
app='c.NotebookApp'
arr+=(["$app.open_browser"]="$app.open_browser = False")
arr+=(["$app.ip"]="$app.ip ='*'")
arr+=(["$app.port"]="$app.port = 8888")
arr+=(["$app.enable_mathjax"]="$app.enable_mathjax = True")
arr+=(["$app.notebook_dir"]="$app.notebook_dir = '/home/pi/notebooks'")
arr+=(["$app.password"]="$app.password = 'sha1:5815fb7ca805:f09ed218dfcc908acb3e29c3b697079fea37486a'")

# apply changes to jupyter_notebook_config.py

for key in ${!arr[@]};do
    if grep -qF $key ${target}; then
        # key found -> replace line
        sed -i "/${key}/c ${arr[${key}]}" $target
    else
        # key not found -> append line
        echo "${arr[${key}]}" >> $target
    fi
done

# install bash kernel
python3 -m bash_kernel.install

# install extensions
jupyter serverextension enable --py jupyterlab
jupyter nbextension enable --py widgetsnbextension --sys-prefix
jupyter nbextension enable --py --sys-prefix bqplot

# activate clusters tab in notebook interface
/home/pi/.venv/jns/bin/ipcluster nbextension enable --user

# install nodejs and node version manager n
# if node is not yet installed
if which node > /dev/null
    then
        echo "node is installed, skipping..."
    else
        # install nodejs and node version manager n
        cd ~/jns
        # fix for issue #22
        # install nodejs and node version manager n
        # see: https://github.com/mklement0/n-install
        curl -L https://git.io/n-install | bash -s -- -y lts
fi

# install jupyter lab extensions
bash -i inst_lab_ext.sh

created a new file called inst_lab_ext.sh as follows:

#!/bin/bash
# script name:     inst_lab_ext.sh
# last modified:   2018/05/29
# sudo:            no

script_name=$(basename -- "$0")
env="/home/pi/.venv/jns"

if [ $(id -u) = 0 ]
then
   echo "usage: ./$script_name"
   exit 1
fi

. /home/pi/.bashrc
jupyter lab clean
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
jupyter labextension install bqplot --no-build
jupyter labextension install jupyterlab_bokeh --no-build
jupyter lab build

testing as you described by uninstalling node, rebooting and running conf_jupyter.sh produces the following output:

pi@test-pi:~/jns $ ./conf_jupyter.sh
Writing default config to: /home/pi/.jupyter/jupyter_notebook_config.py
Installing IPython kernel spec
Enabling: jupyterlab
- Writing config: /home/pi/.jupyter
    - Validating...
      jupyterlab 0.32.1 OK
Enabling notebook extension jupyter-js-widgets/extension...
      - Validating: OK
Enabling notebook extension bqplot/extension...
      - Validating: OK
Enabling IPython clusters tab
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 38002  100 38002    0     0  64219      0 --:--:-- --:--:-- --:--:--  570k
-- Cloning https://github.com/tj/n to '/home/pi/n/n/.repo'...
-- Running local n installation to '/home/pi/n/bin'...
-- Shell initialization file '/home/pi/.bashrc' updated.
-- Installing helper scripts in '/home/pi/n/bin'...
-- Installing the requested Node.js version(s)...
   1 of 1: lts...

     install : node-v8.11.2
       mkdir : /home/pi/n/n/versions/node/8.11.2
       fetch : https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-armv7l.tar.gz
######################################################################## 100.0%
   installed : v8.11.2

=== n successfully installed.
  The active Node.js version is: v8.11.2

  Run `n -h` for help.
  To update n later, run `n-update`.
  To uninstall, run `n-uninstall`.

  IMPORTANT: OPEN A NEW TERMINAL TAB/WINDOW or run `. /home/pi/.bashrc`
             before using n and Node.js.
===
> /home/pi/n/bin/npm pack @jupyter-widgets/jupyterlab-manager
jupyter-widgets-jupyterlab-manager-0.35.0.tgz
> /home/pi/n/bin/npm pack bqplot
bqplot-0.3.6.tgz
> /home/pi/n/bin/npm pack jupyterlab_bokeh
jupyterlab_bokeh-0.5.0.tgz
[LabBuildApp] > node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has incorrect peer dependency "react@^15.6.1".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has incorrect peer dependency "react-dom@^15.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 71.86s.
[LabBuildApp] > node /home/pi/.venv/jns/lib/python3.5/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
$ webpack --config webpack.prod.config.js
Hash: d321245652a6d580783d
Version: webpack 2.7.0
Time: 328076ms
                                 Asset       Size  Chunks                    Chunk Names
af7ae505a9eed503f8b8e6982036873e.woff2    77.2 kB          [emitted]         
  d104fcf119d40c51554ddb8b377142e5.gif  833 bytes          [emitted]         
  3e4484ea8db10af1320808c8477346ea.gif  836 bytes          [emitted]         
  2352874b5f636ca331fe9509a2f9bdd7.gif  830 bytes          [emitted]         
  912ec66d7572ff821749319396470bde.svg     444 kB          [emitted]  [big]  
  b06871f281fee6b241d60582ae9369b9.ttf     166 kB          [emitted]         
  d10bc07005bb2d604f4905183690ac04.png    7.01 kB          [emitted]         
  093a819138276b446611d1d2a45b98a2.png    4.63 kB          [emitted]         
  6ccc1ed85229f7c88b07bbbeefe5214d.gif  846 bytes          [emitted]         
  674f50d287a8c48dc19ba404d20fe713.eot     166 kB          [emitted]         
  ea4ebe072be75fbbea002631916836de.png    6.31 kB          [emitted]         
  40bf25799e4fec8079c7775083de09df.png    7.01 kB          [emitted]         
  4e7e3e142f3939883cd0a7e00cabdaef.png    4.68 kB          [emitted]         
 fee66e712a8a08eef5805a46892932ad.woff      98 kB          [emitted]         
  b2c868bfc2cab12122861c8214e38724.gif  851 bytes          [emitted]         
  00dd0ec0a16a1085e714c7906ff8fb06.png    7.07 kB          [emitted]         
  a92d8f6c106943995720f2884634670e.gif  823 bytes          [emitted]         
             0.279ec850a9242db04c85.js     465 kB       0  [emitted]  [big]  
             1.3f0907688140eb64d6ec.js     138 kB       1  [emitted]         @jupyter-widgets/controls
          main.3dba42d4f63c3134da9a.js    3.71 MB       2  [emitted]  [big]  main
        vendor.4ceb43358f0848e97d69.js    1.57 MB       3  [emitted]  [big]  vendor
      manifest.d9a1f100e521cd36a18c.js    1.65 kB       4  [emitted]         manifest
         0.279ec850a9242db04c85.js.map    1.35 MB       0  [emitted]         
         1.3f0907688140eb64d6ec.js.map     455 kB       1  [emitted]         @jupyter-widgets/controls
      main.3dba42d4f63c3134da9a.js.map    13.7 MB       2  [emitted]         main
    vendor.4ceb43358f0848e97d69.js.map    5.69 MB       3  [emitted]         vendor
  manifest.d9a1f100e521cd36a18c.js.map    8.29 kB       4  [emitted]         manifest
                            index.html    1.53 kB          [emitted]         
[+HaM] ./~/@phosphor/messaging/lib/index.js 18.5 kB {3} [built]
[8U58] ./~/codemirror/lib/codemirror.js 373 kB {3} [built]
[CUbq] ./~/@phosphor/signaling/lib/index.js 18.1 kB {3} [built]
[EFqf] ./~/marked/lib/marked.js 32.4 kB {3} [built]
[GiK3] ./~/react/index.js 190 bytes {3} [built]
[Js9g] ./build/index.out.js 37.4 kB {2} [built]
[O27J] ./~/react-dom/index.js 1.36 kB {3} [built]
[PJh5] ./~/moment/moment.js 132 kB {3} [built]
[q1RZ] ./~/@phosphor/datagrid/lib/index.js 793 bytes {3} [built]
[qzHn] ./~/@phosphor/coreutils/lib/index.js 721 bytes {3} [built]
[rplX] ./~/whatwg-fetch/fetch.js 13 kB {2} [built]
[wr2+] ./~/@phosphor/properties/lib/index.js 6.58 kB {3} [built]
[wuIn] ./~/comment-json/index.js 103 bytes {3} [built]
   [8] multi @phosphor/algorithm @phosphor/application @phosphor/commands @phosphor/coreutils @phosphor/datagrid @phosphor/disposable @phosphor/domutils @phosphor/dragdrop @phosphor/messaging @phosphor/properties @phosphor/signaling @phosphor/virtualdom @phosphor/widgets ajv ansi_up codemirror comment-json es6-promise marked moment path-posix react react-dom sanitize-html url-parse xterm 328 bytes {3} [built]
   [9] multi whatwg-fetch ./build/index.out.js 40 bytes {2} [built]
    + 2541 hidden modules

WARNING in ./~/qgrid/src/qgrid.widget.js
Module not found: Error: Can't resolve 'base/js/dialog' in '/home/pi/.venv/jns/share/jupyter/lab/staging/node_modules/qgrid/src'
 @ ./~/qgrid/src/qgrid.widget.js 12:11-36
 @ ./~/qgrid/src/index.js
 @ ./~/qgrid/src/jupyterlab-plugin.js
 @ ./build/index.out.js
 @ multi whatwg-fetch ./build/index.out.js
Child html-webpack-plugin for "index.html":
    [3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
    [DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
    [GTAU] ./~/html-loader!./templates/partial.html 420 bytes {0} [built]
    [M4fF] ./~/lodash/lodash.js 540 kB {0} [built]
    [vxCX] ./~/html-webpack-plugin/lib/loader.js!./templates/template.html 1.41 kB {0} [built]
Done in 335.45s.
pi@test-pi:~/jns $ 

Thanks, -Kevin

Kevin--R commented 6 years ago

Follow up to my previous post:

After installation completes, you will still need to activate the change made to .bashrc when node was installed before doing anything that requires node.

This can be accomplished by any of the following:

That's the reason for this warning during node installation:

  IMPORTANT: OPEN A NEW TERMINAL TAB/WINDOW or run `. /home/pi/.bashrc`
             before using n and Node.js.

You can see this by running the following commands after your installation completes:

pi@test-pi:~/jns $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
pi@test-pi:~/jns $ . ~/.bashrc
pi@test-pi:~/jns $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/pi/n/bin
pi@test-pi:~/jns $ 

If you look at your $PATH environmental variable and see /home/pi/n/bin you are ready to use node.

Also note that if you uninstall node with n-uninstall /home/pi/n/bin will remain in your $PATH environmental variable until you reboot or logout and log back in.

-Kevin

kleinee commented 6 years ago

@Kevin--R @gusdrawn

Many thanks for your elegant solution and comprehensive explanation @Kevin--R . As you can see form CHANGELOG.md I added your changes to the repository and stole your follow-up post for README.md... Hope I got it all right. Best would be if you could skim through README.md to confirm. Off to work...

Kevin--R commented 6 years ago

@kleinee

I'm happy to be able to contribute to this great resource.

I read through README.md and your changes look good to me.

I just finished a complete fresh install. I normally call the scripts one at a time and follow along, but this time I just called sudo ./inst_jns.sh. The script ran all the way through as expected without any errors.

@kleinee thanks again for all the time and effort you have put into creating and maintaining this.

-Kevin