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

Ark --install command panics #648

Open
jmcphers opened this issue Nov 27, 2024 · 3 comments
Open

Ark --install command panics #648

jmcphers opened this issue Nov 27, 2024 · 3 comments

Comments

@jmcphers
Copy link
Contributor

To repro, just run ark --install. This appears:

thread 'main' panicked at /home/jmcphers/git/ark/crates/harp/src/command.rs:33:42:
called `Result::unwrap()` on an `Err` value: NotPresent
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Some debugging suggests the problem is that this command requires R_HOME to be set. So you can do this:

export R_HOME=$(R RHOME)

After this you can install, but you get a spurious error about needing a connection file.

./ark --install
Successfully installed Ark Jupyter kernelspec.

    Kernel: /home/jmcphers/.local/share/jupyter/kernels/ark/kernel.json
    
Error: A connection file must be specified. Use the `--connection_file` argument.

It's probably fine to require R_HOME to be set so that Ark is registered against the right version of R, but we should check and see if it's set and show something friendly if it isn't.

@fithisux
Copy link

fithisux commented Dec 14, 2024

Same on windows 10 x64, the kernel appears in Jupyter lab but cannot run anything.

But R is in the PATH and R_HOME is set correctly. @jmcphers

PATH is c:\winoss\R\bin

IRKernel works fine in Jupyter lab.

Positron works fine on the other hand

@aaelony
Copy link

aaelony commented Jan 21, 2025

On Pop!Os (see #671), it seems ark cannot find R_HOME. Within crates/ark, cargo run -- --install outputs the following message:

thread 'main' panicked at crates/ark/src/main.rs:387:36:
called `Result::unwrap()` on an `Err` value: Failed to execute R to determine R_HOME

Strangely, I see the following:

$ echo $R_HOME
WARNING: ignoring environment value of R_HOME /usr/lib/R

@aaelony
Copy link

aaelony commented Jan 21, 2025

On linux, the following might be useful for harp::r_version:

R --version | grep "R version" | cut -d' ' -f3
4.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants