fix erroneous instructions to setup a devel environment
Opened this issue · 4 comments
followed the Contributing section of README.md but ran into the following error
git (master >) $ git clone git@github.com:jupyterlab-contrib/rise.git
Cloning into 'rise'...
remote: Enumerating objects: 601, done.
remote: Counting objects: 100% (262/262), done.
remote: Compressing objects: 100% (151/151), done.
remote: Total 601 (delta 148), reused 193 (delta 101), pack-reused 339
Receiving objects: 100% (601/601), 15.16 MiB | 8.72 MiB/s, done.
Resolving deltas: 100% (273/273), done.
git (master >) $ cd rise
rise (main =) $ conda create -n rise python=3.11 node=20.5
Collecting package metadata (current_repodata.json): done
Solving environment: done
<snip>
rise (main =) $ conda activate rise
[rise] rise (main =) $ pip install -e ".[test]"
Obtaining file:///Users/tparment/git/rise
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Installing backend dependencies ... done
Preparing editable metadata (pyproject.toml) ... done
<snip>
[rise] rise (main =) $ jupyter labextension develop . --overwrite
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]
<snip>
Available subcommands: config dejavu events execute kernel kernelspec migrate nbconvert run server troubleshoot trust
Jupyter command `jupyter-labextension` not found.
[rise] rise (main =) $ pip install jupyter
Collecting jupyter
<snip>
[rise] rise (main =) $ jupyter labextension develop . --overwrite
Installing /Users/tparment/git/rise/jupyterlab_rise/labextension -> jupyterlab-rise
Building extension in /Users/tparment/git/rise/jupyterlab_rise
/Users/tparment/miniconda3/envs/rise/lib/python3.11/site-packages/jupyterlab/debuglog.py:56: UserWarning: An error occurred.
warnings.warn("An error occurred.")
/Users/tparment/miniconda3/envs/rise/lib/python3.11/site-packages/jupyterlab/debuglog.py:57: UserWarning: FileNotFoundError: [Errno 2] No such file or directory: '/Users/tparment/git/rise/jupyterlab_rise/package.json'
warnings.warn(msg[-1].strip())
/Users/tparment/miniconda3/envs/rise/lib/python3.11/site-packages/jupyterlab/debuglog.py:58: UserWarning: See the log file for details: /var/folders/9n/sxs31qhj1gnd6gk2v0ns8848000fn2/T/jupyterlab-debug-hoa28_43.log
warnings.warn(f"See the log file for details: {log_path!s}")
so I see several improvements that can be done there
-
reword
Change directory to the jupyterlab_rise directory
into
Change directory to the top folder of the cloned repo
because there is a subfolder named
jupyterlab_rise
so it's confusing, esp. as the toplevel repo may not be called that -
either add a dependency so that jupyter-labextension gets installed by
pip install -e .
or instruct developers topip install jupyter
like I did (maybe there's a better way to do that ?) -
actually provide a
package.json
if that's what it takes ?
Ran into pretty much the same issue when following the instruction. After the first two steps (cloning the repo and moving into ./rise/jupyterlab_rise
) the next step (pip install -e ".[test]"
) returns the following
ERROR: file my/path/rise/jupyterlab_rise does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
The same command seems to be working in the main repository directory, but when trying to follow it up with the next step jupyter labextension develop . --overwrite
it once again fails with
Installing my\path\rise\jupyterlab_rise\labextension -> jupyterlab-rise
Building extension in D:\CV_rozmowy_staz\Enelpol\szkolenia_nokia\other\rise\jupyterlab_rise
C:\Python312\Lib\site-packages\jupyterlab\debuglog.py:56: UserWarning: An error occurred.
warnings.warn("An error occurred.")
C:\Python312\Lib\site-packages\jupyterlab\debuglog.py:57: UserWarning: FileNotFoundError: [Errno 2] No such file or directory: 'my\\path\\rise\\jupyterlab_rise\\package.json'
warnings.warn(msg[-1].strip())
C:\Python312\Lib\site-packages\jupyterlab\debuglog.py:58: UserWarning: See the log file for details: C:\Users\me\AppData\Local\Temp\jupyterlab-debug-i4oz45fp.log
warnings.warn(f"See the log file for details: {log_path!s}")
and the log of the error is as follows:
Installing D:\my_path\rise\jupyterlab_rise\labextension -> jupyterlab-rise
Building extension in D:\my\path\rise\jupyterlab_rise
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
yield
File "C:\Python312\Lib\site-packages\jupyterlab\labextensions.py", line 163, in start
ans = self.run_task()
^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\jupyterlab\labextensions.py", line 252, in run_task
develop_labextension_py(
File "C:\Python312\Lib\site-packages\jupyterlab\federated_labextensions.py", line 180, in develop_labextension_py
build_labextension(base_path, logger=logger)
File "C:\Python312\Lib\site-packages\jupyterlab\federated_labextensions.py", line 208, in build_labextension
builder = _ensure_builder(ext_path, core_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\jupyterlab\federated_labextensions.py", line 266, in _ensure_builder
with open(osp.join(ext_path, "package.json")) as fid:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'my\\path\\rise\\jupyterlab_rise\\package.json'
There is a possibility that I've done something wrong or omitted some steps in my env / jupyter setup, but seeing that other people had encountered the same issue it might not be the case.
I am working on Windows 11
, with pip 24.0
, node 20.9.0
and python 3.12.0
I would be really grateful for any clarification/help in that regard.
Thanks
@Y3drk since you are on Windows, does enabling symbolic links help by any chance?
On Windows, symbolic links can be activated on Windows 10 or above for Python version 3.8 or higher by activating the ‘Developer Mode’. That may not be allowed by your administrators. See Activate Developer Mode on Windows for instructions.
@krassowski I've read about it but haven't tried it. I don't have much time to spare so I can't promise it, but if I ever go back to it I'll try it
I was able to get a development environment setup by modifying the instructions a bit.
Before I would get to the jupyter labextension develop . --overwrite
step but it always gave me a FileNotFound
error as was described by Y3drk. Fixed by running jlpm build
before this instruction.
jlpm build
would also complain about dependencies missing in yarn.lock
.
Internal Error: fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
That was fixed by adding an extra jlpm
command before jlpm build
.
Here were my steps:
Install node version 20, python 3.11.
And then execute the following commands in the RISE repo:
pip install -e ".[test]"
pip install jupyter
jlpm
jlpm build
jupyter labextension develop . --overwrite
jupyter server extension enable jupyterlab_rise