juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

Terminal only installs and recognizes "julia-release", instead of "julia" and "juliaup"

Open unary-code opened this issue 1 year ago • 2 comments

  1. Output of 'versioninfo()' is:
Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 80 × Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake-avx512)
  Threads: 1 on 80 virtual cores
Environment:
  LD_LIBRARY_PATH = /opt2/software/hdf5/1.10.4/lib
  1. How I installed Julia is below (and a list of steps of what I did):

I did this from the "/home/[MyUser]" directory of the terminal.

First, I did "rm -rf .julia" which entirely removes the ".julia" folder (which itself contained a "juliaup" folder).

Then, I did " curl -fsSL https://install.julialang.org | sh " During this installation, I customized it. The only thing I changed from the default customization was that I answered "Yes" to "Do you want to add channel specific symlinks?". My answer to "Enter the folder where you want to install Juliaup" was the default answer ("· /home/MyUser/.juliaup")

I get this error:

Now installing Juliaup
Installing Julia 1.9.2+0.x64.linux.gnu
Creating symlink julia-release for Julia 1.9.2+0.x64.linux.gnu.
Symlink julia-release added in /home/zbk1/.local/bin. Add this directory to the system PATH to make the command available in your shell.
Configured the default Julia version to be 'release'.
Error: failed to create symlink `/home/zbk1/.juliaup/bin/julia`.

Caused by:
    File exists (os error 17)

Question: Is the "File exists" error referring to the fact that "julia-release" already existed in /home/zbk1/.local/bin , before I did this "curl" command to install julia?

Then I did "setenv PATH "/home/zbk1/.local/bin:$PATH" which adds all the scripts in /home/zbk1/.local/bin to the PATH variable, so taht all the scripts in /home/zbk1/.local/bin can be directly run as commands.

Then when I do "julia", it says "julia: Command not found." When I do "juliaup", it says "juliaup: Command not found." Then when I do "julia-release", that works. That brings me to a Julia shell where I can run a line of Julia code at a time.

Question: I think I really need to be able to run the "julia" and "juliaup" command, so that "from pysr import PySRRegressor" works. On the server-connected terminal (the terminal described above), the "/home/[MyUser]/.local/bin" folder only contains a "julia-release" script and not a "julia" or "juliaup" script. How do I install julia so that "julia" and "juliaup" command are recognized?

Why the fact that "julia" is not a recognizable command is a issue for me:

I did "pip3 install -U pysr" in the terminal to install pysr as a package. I did "python3" to open a Python shell, and in the Python shell I did "import pysr". Then I did "from pysr import PySRRegressor", which gives me the message

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'PySRRegressor'

All the above was done a server-connected terminal where "julia" is not a recognizable command. While on my normal non-server-connected terminal that is NOT server-connected, "julia" is a recognizable command, and "from pysr import PySRRegressor" actually does work.

unary-code avatar Jul 09 '23 16:07 unary-code

Question: Is the "File exists" error referring to the fact that "julia-release" already existed in /home/zbk1/.local/bin , before I did this "curl" command to install julia?

No. The error tells you the cause

Error: failed to create symlink `/home/zbk1/.juliaup/bin/julia`.

Caused by:
    File exists (os error 17)

This means that ~/.juliaup/bin/julia exists and you will have to remove it.

But one thing is odd...

You said that

The only thing I changed from the default customization was that I answered "Yes" to "Do you want to add channel specific symlinks?". My answer to "Enter the folder where you want to install Juliaup" was the default answer ("· /home/MyUser/.juliaup")

I think you also missed the part that the default is actually ~/.julia/ on where to install juliaup. I still wonder why it fails to symlink though. EDIT: I mean what causes it to have an existing julia file in that directory?

uncomfyhalomacro avatar Jul 12 '23 13:07 uncomfyhalomacro

I think without a reply by @unary-code here (to clarify whether ~/.juliaup/bin/julia already existed) there is nothing further that can be done with this issue, as the circumstances that triggered it are unclear and so nothing really can be done?

fingolfin avatar Jan 05 '24 08:01 fingolfin