Specific package version with conda-forge

8-Bit Borges picture 8-Bit Borges · Dec 23, 2017 · Viewed 10.8k times · Source

I am trying to install a specific Keras version from Keras 1 API using conda-forge, because

$ conda search keras

returns only the following Keras 2 API options:

keras                        2.0.8            py35h86bcf3e_0  defaults
                             2.0.8            py27h242e9fd_0  defaults
                             2.0.8            py36h39110e4_0  defaults

whereas $ conda search keras --channel conda-forge

return more options, apart from the usual channels, like so:

keras                        2.0.8            py35h86bcf3e_0  defaults
                             2.0.8            py27h242e9fd_0  defaults
                             2.0.8            py36h39110e4_0  defaults
                             1.0.7                    py27_0  conda-forge
                             1.0.7                    py34_0  conda-forge
                             1.0.7                    py35_0  conda-forge
                             1.0.7                    py36_0  conda-forge
                             1.2.2                    py27_0  conda-forge
                             1.2.2                    py35_0  conda-forge
                             1.2.2                    py36_0  conda-forge
                             2.0.0                    py27_0  conda-forge
                             2.0.0                    py35_0  conda-forge
                             2.0.0                    py36_0  conda-forge
                             2.0.1                    py27_0  conda-forge
                             2.0.1                    py35_0  conda-forge
                             2.0.1                    py36_0  conda-forge
                             2.0.2                    py27_0  conda-forge
                             2.0.2                    py35_0  conda-forge
                             2.0.2                    py36_0  conda-forge
                             2.0.2                    py27_1  conda-forge
                             2.0.2                    py35_1  conda-forge
                             2.0.2                    py36_1  conda-forge
                             2.0.4                    py27_0  conda-forge
                             2.0.4                    py35_0  conda-forge
                             2.0.4                    py36_0  conda-forge
                             2.0.6                    py27_0  conda-forge
                             2.0.6                    py35_0  conda-forge
                             2.0.6                    py36_0  conda-forge
                          *  2.0.9                    py27_0  conda-forge
                             2.0.9                    py35_0  conda-forge
                             2.0.9                    py36_0  conda-forge

so, is it possible to install a 1.x version using conda-forge? I can't find any documentation.

if so, what is the proper syntax for the installation?

Answer

mrk picture mrk · Apr 30, 2019

The way you install any specific version from that information is:

conda install -c conda-forge keras=1.0.7=py27_0

Which is of the format

conda install <package_name>=<version>=<build_string>

If you want to choose which channel (otherwise defaults is chosen by default):

conda install -c <channel> <package_name>=<version>=<build_string>

Note: The comment above (+1) already solved the question, this answer yet adds some details and strives to improve readability.