JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.45k stars 186 forks source link

Cannot build PyCall: InvalidVersionSpec: Invalid version '>=': invalid operator #1038

Closed calvinp0 closed 1 year ago

calvinp0 commented 1 year ago

Hi I am trying to use PyCall on the micromamba-docker image. Everything was working fine until a couple of days ago ( I realise PyCall wasn't updated a couple of days ago but this issue just started appearing).

Whenever I am trying to install one of our packages: RMS, it builds Conda fine but then gets to PyCall and produces this error:

#15 29.18 ERROR: LoadError: Error building `PyCall`:
#15 30.12 Collecting package metadata (current_repodata.json): ...working... failed
#15 30.12
#15 30.12 InvalidVersionSpec: Invalid version '>=': invalid operator
#15 30.12
#15 30.12 [ Info: Running `conda install -y numpy` in root environment
#15 30.12 ERROR: LoadError: failed process: Process(setenv(`/opt/conda/bin/conda install -y numpy`,["_CE_M=", "PWD=/home/mambauser/Code/RMG-Py", "PATH=/opt/conda/envs/rmg_env/bin:/opt/conda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "JULIA_LOAD_PATH_BACKUP=", "JULIA_CONDAPKG_EXE=/opt/conda/bin/conda", "JULIA_PROJECT_BACKUP=", "LC_ALL=C.UTF-8", "JULIA_DEPOT_PATH_BACKUP=", "MAMBA_USER=mambauser", "ENV_NAME=rmg_env"  …  "JULIA_CONDAPKG_BACKEND=System", "JULIA_LOAD_PATH=@:/tmp/jl_ujSQJQ", "_=/opt/conda/envs/rmg_env/bin/python", "_CE_CONDA=", "MAMBA_ROOT_PREFIX=/opt/conda", "JULIA_CONDAPKG_BACKEND_BACKUP=", "HOME=/root", "JULIA_DEPOT_PATH=/opt/conda/envs/rmg_env/share/julia:", "PYTHONIOENCODING=UTF-8", "JULIA_SSL_CA_ROOTS_PATH=/opt/conda/envs/rmg_env/ssl/cacert.pem"]), ProcessExited(1)) [1]

Now I am not sure what the issue is but I did install mamba in the base environment for micromamba (mamba = 1.4.2). I have also tried to point ENV["CONDA_JL_CONDA_EXE"] to /usr/bin/micromamba but then I get another error from libmamba saying it cannot find the configuration file condarc-jl.yml. Uncertain what that file is.

If this is the wrong repo to ask this issue, please let me know!

stevengj commented 1 year ago

That's a conda error, not a PyCall error. It's failing on conda install -y numpy, which probably means that your conda installation is broken.