Is there any way to install a specific build+version of a package in Anaconda? Stack Overflow post "anaconda/conda - install a specific package version" shows how to install a specific version of the package. But look below--there are several pillow packages version 4.2.1 that has "py27" prefix on it.
Background: I am scratching my head to figure the meaning of "conda search" output. For example, on my installation, conda search pillow
gives:
pillow 2.1.0 py26_0 defaults
...
* 3.3.1 py27_0 defaults
3.3.1 py34_0 defaults
3.3.1 py35_0 defaults
....
4.2.1 py27_0 defaults
4.2.1 py35_0 defaults
4.2.1 py36_0 defaults
4.2.1 py27h7cd2321_0 defaults
4.2.1 py35h03abc04_0 defaults
4.2.1 py36h9119f52_0 defaults
4.3.0 py35h550890c_1 defaults
4.3.0 py27h353bd0c_1 defaults
4.3.0 py36h6f462bf_1 defaults
I understand the meaning of 2.1.0, 3.3.1, and so on--the version numbers. But what do py27_0
and defaults
mean? More mind boggling was new appearance of the trailing hex numbers like in py27h7cd2321_0
. After researching some more:
https://www.anaconda.com/blog/developer-blog/package-better-conda-build-3/
tells me that that's a new way to encode the specific build of the package.
So back to my question: given that I'm still on Python 2.7 line of anaconda, how do we choose the py27_0
build instead of the other one (py27h7cd2321_0
) when we do conda install
?
The column with py27_0
is what build/version of python it is for. The column with defaults
is to indicate which Anaconda channel it falls under. Different users or organizations can have their own channels but the default channel is defaults
and another popular channel is conda-forge
.
The way you install any specific version from that information is:
conda install pillow=4.2.1=py27h7cd2321_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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With