Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributor installation doesn't work on Windows #554

Open
haesleinhuepf opened this issue Dec 30, 2023 · 2 comments
Open

Contributor installation doesn't work on Windows #554

haesleinhuepf opened this issue Dec 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@haesleinhuepf
Copy link

haesleinhuepf commented Dec 30, 2023

Description

Hi all,

I'm a developer who is considering to contribute to jupyter-ai. I work on Windows though. The development installation instructions for contributors mentions this terminal command:

# Move to the root of the repo package
cd <jupyter-ai-top>

# Installs all the dependencies and sets up the dev environment
./scripts/install.sh

Which obviously won't work on Windows. Modifying the install.sh to an install.bat seems trivial, but there is an error when executing call jlpm install

Reproduce

Start up windows, install mamba, setup an environment install jupyter-ai as explained in the docs:

  • Setup environment:
conda create -n jupyter-ai python=3.11
  • Activate environment:
conda activate jupyter-ai

From the jupyter-ai code directory (version f9c8033 ) run this:

scripts\install.bat

using this modified scripts/install.bat

call pip install jupyterlab~=4.0
copy playground/config.example.py playground/config.py
call jlpm install
call jlpm dev-install

call pip install sphinx
call pip install -r docs/requirements.txt

This error shows in the error log:

(jupyter-ai) C:\structure\code\jupyter-ai>call jlpm install
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\rober\miniconda3\envs\jupyter-ai\Scripts\jlpm.exe\__main__.py", line 7, in <module>
  File "C:\Users\rober\miniconda3\envs\jupyter-ai\Lib\site-packages\jupyterlab\jlpmapp.py", line 43, in main
    execvp("node", ["node", YARN_PATH, *argv])
  File "C:\Users\rober\miniconda3\envs\jupyter-ai\Lib\site-packages\jupyterlab\jlpmapp.py", line 24, in execvp
    cmd = which(cmd)
          ^^^^^^^^^^
  File "C:\Users\rober\miniconda3\envs\jupyter-ai\Lib\site-packages\jupyterlab_server\process.py", line 61, in which
    raise ValueError(msg)
ValueError: Please install Node.js and npm before continuing installation. You may be able to install Node.js from your package manager, from conda, or directly from the Node.js website (https://nodejs.org).

Complete log:
error_log.txt

I presume I need to install something else before?

Expected behavior

The installation runs through successfully.

Context

  • Operating System and version: Windows 10
  • Browser and version: Chrome 120
  • JupyterLab version: 4.0.10

Two things I can offer:

  • I can send my modified scripts/install.bat as PR.
  • I can debug the error above and send a PR.

Just let me know if you're interested in having developer instructions / scripts for Windows folks.

@haesleinhuepf haesleinhuepf added the bug Something isn't working label Dec 30, 2023
Copy link

welcome bot commented Dec 30, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill
Copy link
Collaborator

@haesleinhuepf Thanks for opening this issue! Our install.sh script is intended to be run with Bash, which you can get using the Windows Subsystem for Linux (WSL): https://www.howtogeek.com/790062/how-to-install-bash-on-windows-11/ (these instructions are for Windows 11, but WSL is also available for Windows 10)

Please let us know if the Bash script works in WSL. We would also be open to a PR with a working install.bat file, preferably if we could automatically update one of the files when the other changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants