cds-astro / ipyaladin

An IPython Widget for Aladin Lite, the sky viewer.
https://cds-astro.github.io/ipyaladin/
BSD 3-Clause "New" or "Revised" License
126 stars 26 forks source link

Attempting to run the develop step for jupyter labextension not working #71

Closed efranzmann closed 10 months ago

efranzmann commented 10 months ago

Hello, I'm trying to get the widget working on a couple different JupyterLab hubs and I'm running into a snag. When I try to run jupyter labextension develop ipyaladin --overwrite I get a FileNotFoundError because it appears to be looking in my current directory rather than where the widget is installed. I manually navigated to where the file system was storing my widgets and tried running it again. This time I got the following from the log file:

Traceback (most recent call last):

  File "/usr/local/lib/python3.6/dist-packages/jupyterlab/federated_labextensions.py", line 384, in _get_labextension_metadata
    package = subprocess.check_output([sys.executable, 'setup.py', '--name'], cwd=mod_path).decode('utf8').strip()

  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout

  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)

subprocess.CalledProcessError: Command '['/usr/bin/python3', 'setup.py', '--name']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/usr/local/lib/python3.6/dist-packages/jupyterlab/debuglog.py", line 48, in debug_logging
    yield

  File "/usr/local/lib/python3.6/dist-packages/jupyterlab/labextensions.py", line 135, in start
    ans = self.run_task()

  File "/usr/local/lib/python3.6/dist-packages/jupyterlab/labextensions.py", line 207, in run_task
    symlink=self.symlink)

  File "/usr/local/lib/python3.6/dist-packages/jupyterlab/federated_labextensions.py", line 146, in develop_labextension_py
    m, labexts = _get_labextension_metadata(module)

  File "/usr/local/lib/python3.6/dist-packages/jupyterlab/federated_labextensions.py", line 387, in _get_labextension_metadata
    'it is missing the `setup.py` file.'.format(module))

FileNotFoundError: The Python package `ipyaladin` is not a valid package, it is missing the `setup.py` file.

Exiting application: lab

Can anyone give me any suggestions on how to get it working?

Thanks!

ManonMarchand commented 10 months ago

Oh I see that you use python 3.6. We don't support this, sorry. We usually try to work with the python versions that are not in end-of-life state, see here : https://devguide.python.org/versions/

As this looks like your system python, I can suggest to work in a virtual environment that'd run an other version (I personally use miniconda for that but there are a lot of other tools.)

Edit: It should solve your issue, but don't hesitate to come back if this not the case

efranzmann commented 10 months ago

Ah! Thank you. I don't run that particular hub but I will contact the admin. Thank you for your help!

ManonMarchand commented 10 months ago

(also you're welcome if you want to develop into ipyaladin, you'd be our first external contributor. We can talk if you need help)

Edit: ah no, the develop step, not the development installation, sorry