Install something with conda-forge error

Hey,

EDIT: I initially wrote this for julia but I have the same issue for other package

I would like to install julia using conda on ubuntu 22.04 64bits but I get something that I don’t understand.

I typed

sudo -E conda install -c conda-forge julia
sudo -E conda install -c conda-forge jupyterview
sudo -E conda install xeus-cling -c conda-forge

end get

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

ResolvePackageNotFound:

  • conda==4.10.3

I have

conda -V
conda 22.9.0

and

sudo -E conda search julia --channel conda-forge
Loading channels: done
# Name                       Version           Build  Channel             
julia                          0.5.2 blas_openblas_0  conda-forge         
julia                          0.5.2 blas_openblas_1  conda-forge         
julia                          0.5.2 blas_openblas_2  conda-forge         
julia                          0.5.2 blas_openblas_200  conda-forge         
julia                          0.5.2 blas_openblas_3  conda-forge         
julia                          0.5.2 blas_openblas_4  conda-forge         
julia                          0.5.2 blas_openblas_5  conda-forge         
julia                          0.5.2 blas_openblas_6  conda-forge         
julia                          0.6.0 blas_openblas_200  conda-forge         
julia                          0.6.1 blas_openblas_200  conda-forge         
julia                          0.6.1 blas_openblas_201  conda-forge         
julia                          0.6.1 blas_openblas_202  conda-forge         
julia                          0.6.1 blas_openblashfe40789_203  conda-forge         
julia                          1.0.0 blas_openblashfe40789_0  conda-forge         
julia                          1.0.1 blas_openblashfe40789_0  conda-forge         
julia                          1.0.2 blas_openblashfe40789_0  conda-forge         
julia                          1.0.3 blas_openblash12d65f3_2  conda-forge         
julia                          1.0.3 blas_openblash977ebb0_0  conda-forge         
julia                          1.0.3 blas_openblash977ebb0_1  conda-forge         
julia                          1.0.3      h1c3500e_3  conda-forge         
julia                          1.1.1      h14ade15_2  conda-forge         
julia                          1.1.1      h1c3500e_0  conda-forge         
julia                          1.1.1      h1c3500e_1  conda-forge         
julia                          1.1.1      h344ffa1_6  conda-forge         
julia                          1.1.1      h880f756_5  conda-forge         
julia                          1.1.1      hb80d53e_3  conda-forge         
julia                          1.1.1      hb80d53e_4  conda-forge         
julia                          1.1.1      hb80d53e_5  conda-forge         
julia                          1.1.1      hea32d20_7  conda-forge         
julia                          1.6.1      h96f571d_0  conda-forge         
julia                          1.6.2      h438a1c7_3  conda-forge         
julia                          1.6.2      h96f571d_0  conda-forge         
julia                          1.6.2      hbb0e23a_1  conda-forge         
julia                          1.6.3      h2a39549_1  conda-forge         
julia                          1.6.3      h438a1c7_0  conda-forge         
julia                          1.6.4      h2a39549_0  conda-forge         
julia                          1.6.4      h34dcedf_1  conda-forge         
julia                          1.6.4      h34dcedf_2  conda-forge         
julia                          1.6.4      h989b2f6_2  conda-forge         
julia                          1.6.5      h989b2f6_0  conda-forge         
julia                          1.6.5      h989b2f6_1  conda-forge         
julia                          1.6.5      h989b2f6_2  conda-forge         
julia                          1.7.0      h989b2f6_0  conda-forge         
julia                          1.7.1      h620718c_0  conda-forge         
julia                          1.7.1      h989b2f6_0  conda-forge         
julia                          1.7.1      h989b2f6_1  conda-forge         
julia                          1.7.1      h989b2f6_2  conda-forge         
julia                          1.7.1      h989b2f6_3  conda-forge         
julia                          1.7.2      h35b96e5_1  conda-forge         
julia                          1.7.2      h52e3dff_1  conda-forge         
julia                          1.7.2      h989b2f6_0  conda-forge         
julia                          1.7.3      h35b96e5_0  conda-forge         
julia                          1.7.3      h6f5dd7c_1  conda-forge         
julia                          1.8.0      h6f5dd7c_0  conda-forge         
julia                          1.8.0      h6f5dd7c_1  conda-forge         
julia                          1.8.0      h6f5dd7c_2  conda-forge         
julia                          1.8.0      h6f5dd7c_3  conda-forge         
julia                          1.8.1      h6f5dd7c_0  conda-forge         
julia                          1.8.2      h00c5a2e_1  conda-forge         
julia                          1.8.2      h6f5dd7c_0  conda-forge         
julia                          1.8.3      h00c5a2e_0  conda-forge

Thank you in advance for your help,
Ludovic

Some feedback:

  • instead of onesy-twosy installs, keep, and check in to version control, an environment.yml that fully describes your “leaf” dependencies
    name: jupyter-kernel-environment
    channels:
      - conda-forge
      - nodefaults
    dependencies:
      - julia
      - jupyterview
      - xeus-cling
    
    • then use conda env update --file environment.yml
    • this allows the solver to take all of the constraints into account at once, instead of resolving each time
  • these commands don’t specify an environment --name or --prefix
    • this means its trying to update the base environment, where conda itself lives
    • i generally recommend only keeping tools directly related to conda (and friends) and their dependencies here
      • so conda install -c conda-forge -n some-otheer-env install
  • one of those friends: try mamba instead of conda
    • it’s a drop-in replacement for conda
    • when it works, it’s always faster, sometimes by an order of magnitude
    • when it fails, also usually faster, it gives different, but usually better error messages
  • finally
    • running conda or mamba as root is kind of a recipe for disaster
      • if there’s any way you can have any other user do installs, you’ll be more within the normal operating bounds
2 Likes

Thank you some much for your fast and detailed answer.
I am a beginner with computer then I don’t understand everything.
I will read your answer carefully.
Thank you

Following your advice I installed julia for all users in their home.
And for packages having only a small probability to cause a disaster I used mamba that is working very well.
Thank you again.

2 Likes