JuliaPy / Conda.jl

Conda managing Julia binary dependencies
Other
174 stars 57 forks source link

Error installing RISE plugin from Conda #247

Closed luraess closed 1 year ago

luraess commented 1 year ago

I m trying to install the RISE plugin for Jupyter notebook as suggested in their website for Julia doing

using Conda
Conda.add_channel("conda-forge")
Conda.add("rise")

However, I ma getting following error leading to an instal abort:

stderr: /Users/ludovic/.julia/conda/3/aarch64/bin/.rise-post-link.sh: line 1: /Users/ludovic/.julia/conda/3/aarch64/bin/jupyter-nbextension: No such file or directory

The RISE suggests that if one would be using pip to install rise, then lately the jupyter-nbextension install rise --py --sys-prefix would no longer be needed as this should now be part of the install script. I am wondering if there is anything that would need to be fixed in the Conda installer?

This is happening with Julia 1.9.3 on MacOS Ventura (M2 arm Mac).

I am using Jupyter installed from Conda:

julia> using Conda

julia> notebook()
install Jupyter via Conda, y/n? [y]: y
[ Info: Downloading miniconda installer ...
[ Info: Installing miniconda ...

The full trace is here:

julia> using Conda

julia> Conda.add_channel("conda-forge")
[ Info: Running `conda config --add channels conda-forge --file /Users/ludovic/.julia/conda/3/aarch64/condarc-julia.yml --force` in root environment
Warning: 'conda-forge' already in 'channels' list, moving to the top

julia> Conda.add("rise")
[ Info: Running `conda install -y rise` in root environment
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 23.3.1
  latest version: 23.7.3

Please update conda by running

    $ conda update -n base -c conda-forge conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.7.3

## Package Plan ##

  environment location: /Users/ludovic/.julia/conda/3/aarch64

  added / updated specs:
    - rise

The following NEW packages will be INSTALLED:

  rise               conda-forge/osx-arm64::rise-5.7.1-py310hbe9552e_2

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(740): An error occurred while installing package 'conda-forge::rise-5.7.1-py310hbe9552e_2'.
Rolling back transaction: done

LinkError: post-link script failed for package conda-forge::rise-5.7.1-py310hbe9552e_2
location of failed script: /Users/ludovic/.julia/conda/3/aarch64/bin/.rise-post-link.sh
==> script messages <==
<None>
==> script output <==
stdout:
stderr: /Users/ludovic/.julia/conda/3/aarch64/bin/.rise-post-link.sh: line 1: /Users/ludovic/.julia/conda/3/aarch64/bin/jupyter-nbextension: No such file or directory

return code: 127

()

ERROR: failed process: Process(setenv(`/Users/ludovic/.julia/conda/3/aarch64/bin/conda install -y rise`,["XPC_FLAGS=0x0", "COMMAND_MODE=unix2003", "PATH=/Users/ludovic/.juliaup/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin", "WARP_USE_SSH_WRAPPER=1", "PWD=/Users/ludovic", "WARP_IS_LOCAL_SHELL_SESSION=1", "XPC_SERVICE_NAME=0", "TERM_PROGRAM=WarpTerminal", "HOMEBREW_PREFIX=/opt/homebrew", "SHELL=/bin/zsh"  …  "_=/Users/ludovic/.juliaup/bin/julia", "HOMEBREW_REPOSITORY=/opt/homebrew", "OPENBLAS_DEFAULT_NUM_THREADS=1", "USER=ludovic", "HOME=/Users/ludovic", "TERM=xterm-256color", "TERM_PROGRAM_VERSION=v0.2023.09.06.18.09.stable_00", "OPENBLAS_MAIN_FREE=1", "COLORTERM=truecolor", "PYTHONIOENCODING=UTF-8"]), ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:565 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:480
 [3] run
   @ ./process.jl:477 [inlined]
 [4] runconda(args::Cmd, env::String)
   @ Conda ~/.julia/packages/Conda/2lg2O/src/Conda.jl:128
 [5] add(pkg::String, env::String; channel::String, satisfied_skip_solve::Bool, args::Cmd)
   @ Conda ~/.julia/packages/Conda/2lg2O/src/Conda.jl:256
 [6] add
   @ ~/.julia/packages/Conda/2lg2O/src/Conda.jl:239 [inlined]
 [7] add(pkg::String)
   @ Conda ~/.julia/packages/Conda/2lg2O/src/Conda.jl:239
 [8] top-level scope
   @ REPL[5]:1
luraess commented 1 year ago

Seems to be a Conda issue and not a Conda.jl issue.

jd-foster commented 1 year ago

I think you might need to pin your python version to 3.9.

luraess commented 1 year ago

I think you might need to pin your python version to 3.9.

Thanks will try. Do you know if this can be achieved within Conda.jl?

EDIT: I also found https://github.com/damianavila/RISE/issues/643#issue-1858208696 And in turn it seems that using notebook < v7 works:

add Conda
add Ijulia
using Conda
Conda.pip_interop(true)
Conda.pip("install", "notebook==6.5.5")
using Pkg
Pkg.build("IJulia")
Conda.pip("install", "RISE")
jd-foster commented 1 year ago

As mentioned in that linked issue:

for people interested in using RISE in jupyterlab and/or notebook-7, there is a successor: pip install jupyterlab-rise which is the outcome of https://github.com/jupyterlab-contrib/rise

but haven't tried it out.

jd-foster commented 1 year ago

I agree with you that this seems entirely on the Python installation side of things and almost nothing to do with the Julia aspects.

luraess commented 1 year ago

I am closing the issue but at least a working solution is documented here while they will hopefully fix things on the RISE side.