PySR icon indicating copy to clipboard operation
PySR copied to clipboard

[BUG] *Installation failed mac m1*

Open fitriaramlan opened this issue 3 years ago • 3 comments

Describe the bug I tried several times: first I with the same python version but used julia version 1.7.3 and 1.7.1 the error was like this:

FileNotFoundError: Julia is not installed in your PATH. Please install Julia and add it to your PATH.

and then uninstall julia, try to set the same like this https://github.com/MilesCranmer/PySR/blob/master/.github/workflows/CI_mac.yml and I got error like this below: If you believe your system's root certificates are safe to use, you can export JULIA_SSL_CA_ROOTS_PATH="" in your environment to use those instead.)' occurred while calling julia code: Pkg.add(sr_spec, io=stderr)

Version (please include the following information):

  • OS: macOS M1
  • Julia version: current 1.6.5 (before 1.7.3 but has the same issues)
  • Python version 3.10
  • PySR version 4.12.0
  • Does the bug still appear with the latest version of PySR? Yes

Configuration

  • What are your PySR settings? None
  • What dataset are you running on? None
  • If possible, please share a minimal code example that produces the error.

Error message Activating environment at ~/.julia/environments/pysr-0.9.5/Project.toml Cloning git-repo https://github.com/MilesCranmer/SymbolicRegression.jl Traceback (most recent call last): File "/Users/fitriawulandari/Library/CloudStorage/OneDrive-NationalUniversityofIreland,Galway/Research/Code/work/main.py", line 26, in model.fit(X, y) File "/Users/fitriawulandari/opt/anaconda3/envs/pySRenv/lib/python3.10/site-packages/pysr/sr.py", line 1607, in fit return self._run(X, y, mutated_params, weights=weights, seed=seed) File "/Users/fitriawulandari/opt/anaconda3/envs/pySRenv/lib/python3.10/site-packages/pysr/sr.py", line 1326, in _run _add_sr_to_julia_project(Main, io_arg) File "/Users/fitriawulandari/opt/anaconda3/envs/pySRenv/lib/python3.10/site-packages/pysr/julia_helpers.py", line 113, in _add_sr_to_julia_project Main.eval(f"Pkg.add(sr_spec, {io_arg})") File "/Users/fitriawulandari/opt/anaconda3/envs/pySRenv/lib/python3.10/site-packages/julia/core.py", line 621, in eval ans = self._call(src) File "/Users/fitriawulandari/opt/anaconda3/envs/pySRenv/lib/python3.10/site-packages/julia/core.py", line 549, in _call self.check_exception(src) File "/Users/fitriawulandari/opt/anaconda3/envs/pySRenv/lib/python3.10/site-packages/julia/core.py", line 603, in check_exception raise JuliaError(u'Exception '{}' occurred while calling julia code:\n{}' julia.core.JuliaError: Exception 'failed to clone from https://github.com/MilesCranmer/SymbolicRegression.jl, error: GitError(Code:ERROR, Class:SSL, Your Julia is built with a SSL/TLS engine that libgit2 doesn't know how to configure to use a file or directory of certificate authority roots, but your environment specifies one via the JULIA_SSL_CA_ROOTS_PATH variable. If you believe your system's root certificates are safe to use, you can export JULIA_SSL_CA_ROOTS_PATH="" in your environment to use those instead.)' occurred while calling julia code: Pkg.add(sr_spec, io=stderr)

fitriaramlan avatar Aug 02 '22 16:08 fitriaramlan

Do you have git installed?

Also, note that your Julia version is not available for M1 so there will likely be other issues. You should install the 1.8 version here: https://julialang.org/downloads/#upcoming_release listed under "macOS ARM."

MilesCranmer avatar Aug 02 '22 16:08 MilesCranmer

Thanks Miles,

Yes I have git installed, and I have installed the julia 1.8 version. but it didn't work.

fitriaramlan avatar Aug 04 '22 11:08 fitriaramlan

Maybe try running this:

export JULIA_SSL_CA_ROOTS_PATH=""

before running the install?

MilesCranmer avatar Aug 04 '22 13:08 MilesCranmer

Hi Miles, I want to give an update..

weird anything didn't work on my mac. so what I did instead was installed windows through vmware fusion, and install Julia, python, pysr.. and pysr work.

fitriaramlan avatar Aug 15 '22 21:08 fitriaramlan

One other thing you could try to get it working directly on your M1 is to manually clone the SymbolicRegression.jl github repository: https://github.com/MilesCranmer/SymbolicRegression.jl, and then specify the folder it is located in with the julia_project command. Maybe try that? It will be much slower in vmware than M1

MilesCranmer avatar Aug 15 '22 21:08 MilesCranmer