Setting up fastai in Ubuntu 22.04.3 LTS with Miniconda

Hi, having some trouble with Miniconda (on a fresh Ubuntu 22.04.3 LTS).

Upon running:

conda install -c fastchan fastai

I get the following:

Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: - 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                      

UnsatisfiableError: The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__cuda==12.0=0
  - feature:/linux-64::__glibc==2.35=0
  - feature:/linux-64::__linux==6.2.0=0
  - feature:|@/linux-64::__cuda==12.0=0
  - feature:|@/linux-64::__glibc==2.35=0
  - fastai -> ipython -> __linux
  - fastai -> ipython -> __osx
  - fastai -> pytorch[version='>=1.7,<2.1'] -> __cuda[version='>=11.8']
  - fastai -> pytorch[version='>=1.7,<2.1'] -> __glibc[version='>=2.17|>=2.17,<3.0.a0']

Your installed version is: 2.35

Note that strict channel priority may have removed packages required for satisfiability.

Any hints?
I don’t think any CUDA is installed at the moment, even though it says it found CUDA 12…

Hi @msp,

Did you create a new environment before attempting the conda install command?

What I did is made my own conda environment named fastai and then did the installs once I was activated in that environment:

  1. Create the new environment:
conda create --name fastai
  1. Activate the environment:
conda activate fastai
// OR
source activate fastai // on Mac/Linux
  1. Make sure your new environment has been activated by seeing the name in parentheses in your terminal prompt: (fastai) $ ...
  2. Install fastai to your new environment:
conda install -c fastchan fastai
  1. Use Pytorch’s getting started guide to select your desired setup and run the command it provides:
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
  1. Now check to make sure everything installed:
conda list
// OR
conda search fastai // and change out the search term for the other packages
  1. If all the packages are listed successfully then your new conda environment is ready to go!