radiasoft / jupyter_rs_vtk

Apache License 2.0
1 stars 1 forks source link

Failed Install Debian 8 #2

Closed dhidas closed 2 years ago

dhidas commented 4 years ago

I've been trying to install jupyter-rs-vtk and -radia on debian 8 under python 3.7. I gathered that vtk was a prerequisite, and it looks like nodejs (npm) as well?

I've tried this using nodejs 13.0.1 and 13.6.0. When I attempt pip install . --user the install proceeds without issue (but of course it's not usable without the extensions enabled). However if I do this using sudo I get the error message copied below.

Is there some config step or package I may be missing on this?

Best Regards

Processing /root/jupyter-rs-vtk ERROR: Command errored out with exit status 1: command: /opt/apps/python/3.7.3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-_8kbxun0/setup.py'"'"'; file='"'"'/tmp/pip-req-build-_8kbxun0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-_8kbxun0/pip-egg-info cwd: /tmp/pip-req-build-_8kbxun0/ Complete output (41 lines): setup.py entered $PATH=/opt/apps/nodejs/13.6.0/bin:/opt/apps/gcc-7_4/openssl/1.1.1c/bin:/opt/apps/gcc/7.4/bin:/opt/apps/python/3.7.3/bin:/root/.local/3.7.3/bin:/opt/apps/slurm/19.05.0/bin:/opt/apps/slurm/19.05.0/sbin:/opt/conda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lpp/mmfs/bin running egg_info running jsdeps 6.13.4 6.13.4 Installing build dependencies with npm. This may take a while... npm WARN prepublish-on-install As of npm@5, prepublish scripts are deprecated. npm WARN prepublish-on-install Use prepare for build steps and prepublishOnly for upload-only. npm WARN prepublish-on-install See the deprecation note in npm help scripts for more information. npm WARN lifecycle jupyter-rs-vtk@0.0.1~prepublish: cannot run in wd jupyter-rs-vtk@0.0.1 webpack (wd=/tmp/pip-req-build-_8kbxun0/js) npm WARN jupyter-rs-vtk@0.0.1 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 3494 packages in 2.107s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
rebuilding js and css failed
missing files: ['/tmp/pip-req-build-_8kbxun0/jupyter_rs_vtk/static/extension.js', '/tmp/pip-req-build-_8kbxun0/jupyter_rs_vtk/static/index.js']
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-_8kbxun0/setup.py", line 181, in <module>
    setup(**setup_args)
  File "/opt/apps/python/3.7.3/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/opt/apps/python/3.7.3/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/apps/python/3.7.3/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/opt/apps/python/3.7.3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-_8kbxun0/setup.py", line 45, in run
    raise e
  File "/tmp/pip-req-build-_8kbxun0/setup.py", line 38, in run
    self.distribution.run_command('jsdeps')
  File "/opt/apps/python/3.7.3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-_8kbxun0/setup.py", line 118, in run
    raise ValueError(msg)
ValueError: Missing file: /tmp/pip-req-build-_8kbxun0/jupyter_rs_vtk/static/extension.js
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

bnash commented 4 years ago

Hi @dhidas, glad to see you are working with Radia and RadiaSoft's VTK widget. @robnagler can help you with this installation. If you want to see an example of the VTK widget working, you can try it on our Jupyter server https://jupyter.radiasoft.org/ If you clone the repository https://github.com/radiasoft/jupyter-rs-radia you can try the notebook: RADIA_Example05.ipynb in the examples directory. We are currently actively developing the link between the Radia examples in Jupyter and the VTK widget, so your feedback would be much appreciated.

dhidas commented 4 years ago

Hi Boaz,

Thanks. I did try the example on the server and it worked very well, which is why I am trying to install it on my end now where it's connected to our computing cluster, etc.

Best,

-Dean

On 1/15/20, 1:55 PM, "Boaz Nash" notifications@github.com wrote:

Hi 
@dhidas <https://github.com/dhidas>, glad to see you are working with Radia and RadiaSoft's VTK widget.
@robnagler <https://github.com/robnagler> can help you with this installation.
If you want to see an example of the VTK widget working, you can try it on our Jupyter server
https://jupyter.radiasoft.org/ <https://urldefense.com/v3/__https://jupyter.radiasoft.org/__;!!P4SdNyxKAPE!Rvns0pQV9Ucl7kfsvcZoBsexbHv4bWsy_EwrAH8lfBCSUn6qvd0l8PU5qdm9qA$>
If you clone the repository
https://github.com/radiasoft/jupyter-rs-radia
you can try the notebook: RADIA_Example05.ipynb in the examples directory.
We are currently actively developing the link between the Radia examples in Jupyter and the VTK widget, so your feedback would be much appreciated.
—
You are receiving this because you were mentioned.
Reply to this email directly, 
view it on GitHub <https://github.com/radiasoft/jupyter-rs-vtk/issues/2?email_source=notifications&email_token=ABMBVUEX6PM7E3OKMGZVAETQ55LYFA5CNFSM4KHIC3V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBMIBQ#issuecomment-574800902>, or 
unsubscribe <https://github.com/notifications/unsubscribe-auth/ABMBVUDWSIIB5E6DRKKQWQLQ55LYFANCNFSM4KHIC3VQ>.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/radiasoft/jupyter-rs-vtk/issues/2?email_source=notifications\u0026email_token=ABMBVUEX6PM7E3OKMGZVAETQ55LYFA5CNFSM4KHIC3V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBMIBQ#issuecomment-574800902",
"url": "https://github.com/radiasoft/jupyter-rs-vtk/issues/2?email_source=notifications\u0026email_token=ABMBVUEX6PM7E3OKMGZVAETQ55LYFA5CNFSM4KHIC3V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBMIBQ#issuecomment-574800902",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
robnagler commented 4 years ago

@dhidas how is your Jupyter environment setup? Is it using JupyterLab? If so, it has to be using node, npm, etc. If not, I don't think this is going to work too well.

dhidas commented 4 years ago

This is on a jupyterhub server running notebook and jupyterlab.

The versions I have are: node --version v13.0.1 npm --version 6.12.0

I previously did a pip install vtk. Maybe I am missing something in the install chain or have a wrong version of something?

-Dean

On 1/15/20, 3:41 PM, "Rob Nagler" notifications@github.com wrote:

@dhidas <https://github.com/dhidas> how is your Jupyter environment setup?
 Is it using JupyterLab? If so, it has to be using node, npm, etc. If not, I don't think this is going to work too well.
—
You are receiving this because you were mentioned.
Reply to this email directly, 
view it on GitHub <https://github.com/radiasoft/jupyter-rs-vtk/issues/2?email_source=notifications&email_token=ABMBVUEPXKKLOKCAQKHCD4DQ55YGZA5CNFSM4KHIC3V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBXPRI#issuecomment-574846917>, or 
unsubscribe <https://github.com/notifications/unsubscribe-auth/ABMBVUBWQZAARXEETOUATT3Q55YGZANCNFSM4KHIC3VQ>.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/radiasoft/jupyter-rs-vtk/issues/2?email_source=notifications\u0026email_token=ABMBVUEPXKKLOKCAQKHCD4DQ55YGZA5CNFSM4KHIC3V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBXPRI#issuecomment-574846917",
"url": "https://github.com/radiasoft/jupyter-rs-vtk/issues/2?email_source=notifications\u0026email_token=ABMBVUEPXKKLOKCAQKHCD4DQ55YGZA5CNFSM4KHIC3V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBXPRI#issuecomment-574846917",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
robnagler commented 4 years ago

We build it in our Docker image as follows:

    pip install jupyterlab
    pip install jupyterhub jupyterlab-launcher nbzip
    jupyter labextension install --no-build \
        @jupyter-widgets/jupyterlab-manager \
        @jupyterlab/hub-extension \
        jupyter-matplotlib \
        jupyterlab-plotly \
        plotlywidget \
        jupyterlab-chart-editor
    for f in jupyter-rs-vtk jupyter-rs-radia; do
        git clone https://github.com/radiasoft/"$f"
        cd "$f"
        pip install .
        m=${f#*/}
        jupyter nbextension enable --py --sys-prefix "${m//-/_}"
        cd js
        jupyter labextension install --no-build .
        cd ../..
    done
    jupyter lab build

This assumes you are not running a separate kernel environment. If you are running multiple kernel environments, you'll need to install in each of those as well:

        for f in radiasoft/jupyter-rs-vtk radiasoft/jupyter-rs-radia; do
            pip install "git+git://github.com/$f#egg=${f#*/}"
        done

You will need to install Radia separately. The .so needs to be available.

JupyterHub should be "irrelevant", because it's the JupyterLab environment that matters. You shouldn't need to pip install vtk manually.

dhidas commented 4 years ago

Did something change on jupyter.radiasoft.org? I am now getting the following error. I would like to get back to trying to get this up on debian8, but haven't looked at it for a while..

import ipywidgets
import radia as rad
import numpy as np
import time
import matplotlib.pyplot as plt
import ipywidgets
from jupyter_rs_radia import radia_viewer

# define radia viewer
rv = radia_viewer.RadiaViewer()
from jupyter_rs_radia import radia_viewer
​
# define radia viewer
rv = radia_viewer.RadiaViewer()
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-2-8a9bfae3312b> in <module>
      2 
      3 # define radia viewer
----> 4 rv = radia_viewer.RadiaViewer()

~/.pyenv/versions/py3/lib/python3.7/site-packages/jupyter_rs_radia/radia_viewer.py in __init__(self, mgr)
    217         #TODO(mvk): build view from this schema
    218         self.schema = PKDict(json.JSONDecoder().decode(
--> 219             resources.read_text(rsjson, 'schema.json')
    220         ))
    221 

~/.pyenv/versions/3.7.2/lib/python3.7/importlib/resources.py in read_text(package, resource, encoding, errors)
    167     resource = _normalize_path(resource)
    168     package = _get_package(package)
--> 169     with open_text(package, resource, encoding, errors) as fp:
    170         return fp.read()
    171 

~/.pyenv/versions/3.7.2/lib/python3.7/importlib/resources.py in open_text(package, resource, encoding, errors)
    123     reader = _get_resource_reader(package)
    124     if reader is not None:
--> 125         return TextIOWrapper(reader.open_resource(resource), encoding, errors)
    126     _check_location(package)
    127     absolute_package_path = os.path.abspath(package.__spec__.origin)

~/.pyenv/versions/3.7.2/lib/python3.7/importlib/_bootstrap_external.py in open_resource(self, resource)

FileNotFoundError: [Errno 2] No such file or directory: '/home/vagrant/.pyenv/versions/py3/lib/python3.7/site-packages/jupyter_rs_radia/json/schema.json'
robnagler commented 4 years ago

@dhidas https://github.com/radiasoft/jupyter-rs-radia/issues/34 is fixed in master and in beta right now. Maybe do a pull and a rebuild?

dhidas commented 4 years ago

@robnagler The above was on jupyter.radiasoft.org I think in the default config that was available.

robnagler commented 4 years ago

Ah yes, I was confused by the issue title. Production release happening now, see https://github.com/radiasoft/jupyter.radiasoft.org/issues/84. You will need to restart your Jupyter server when it is done.

robnagler commented 2 years ago

fixed