2

I use the following command to install g++ in my conda enviroment:

conda install gxx

After installation, use g++ --version to check the version and got this output:

g++ (conda-forge gcc 12.2.0-19) 12.2.0

However my CUDA version is 11.3 which doesn't work with g++ 12.2.0. Below is the error when I tried to run sh ./make.sh according to this repo:

RuntimeError: The current installed version of g++ (12.2.0) is
greater than the maximum required version by CUDA 11.3 (10.2.1). 
Please make sure to use an adequate version of g++ (>=5.0.0, 
<=10.2.1).

So my question is what is the conda command to install version 10.2.1 g++?

I tried the following commands and none of them are working:

conda install gxx-10.2.1
conda install gxx@10.2.1
conda install gxx==10.2.1
conda install gxx 10.2.1
talonmies
  • 70,661
  • 34
  • 192
  • 269
etang
  • 329
  • 3
  • 10

1 Answers1

1

Were it available, the syntax would be:

conda install gxx=10.2.1

However, Conda doesn't build every version: that specific one does not appear available. It is possible for Conda Forge to build out-of-sequence versions via non-main branches. If you absolutely need that version you could request it on the feedstock. However, that is a very complex feedstock and may have trouble getting a volunteer to contribute the time to modify the recipe.

Otherwise, you can look for something in the range using the MatchSpec syntax:

## heed the usage of quotes
conda install 'gxx[version=">=5,<10.2.1"]'

which for me on linux-64 platform resolves to gxx=9.5.0.1


[1] Note that I have conda-forge set as the default channel. If that is not the case for you, you may also require the argument -c conda-forge. Also, do not install this in a base Anaconda environment - there be dragons.

merv
  • 67,214
  • 13
  • 180
  • 245