[python] anaconda/conda - install a specific package version

I want to install the 'rope' package in my current active environment using conda. Currently, the following 'rope' versions are available:

(data_downloader)user@user-ThinkPad ~/code/data_downloader $ conda search rope
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ....
cached-property              1.2.0                    py27_0  defaults        
                             1.2.0                    py34_0  defaults        
                             1.2.0                    py35_0  defaults        
                             1.3.0                    py27_0  defaults        
                             1.3.0                    py34_0  defaults        
                             1.3.0                    py35_0  defaults        
rope                         0.9.4                    py26_0  defaults        
                             0.9.4                    py27_0  defaults        
                             0.9.4                    py33_0  defaults        
                             0.9.4                    py34_0  defaults        
                             0.9.4                    py26_1  defaults        
                             0.9.4                    py27_1  defaults        
                             0.9.4                    py33_1  defaults        
                             0.9.4                    py34_1  defaults        
                          .  0.9.4                    py35_1  defaults        

I would like to install the following one:

                         1.3.0                    py35_0  defaults        

I've tried all sorts of permutations of 'conda install' which I'm not going to list here because none of them are correct.

I am also not sure what the py35_0 is (I'm assuming this is the version of the python against which the package was built?) and I also don't know what 'defaults' means?

This question is related to python anaconda

The answer is


If any of these characters, '>', '<', '|' or '*', are used, a single or double quotes must be used

conda install [-y] package">=version"
conda install [-y] package'>=low_version, <=high_version'
conda install [-y] "package>=low_version, <high_version"

conda install -y torchvision">=0.3.0"
conda install  openpyxl'>=2.4.10,<=2.6.0'
conda install "openpyxl>=2.4.10,<3.0.0"

where option -y, --yes Do not ask for confirmation.

Here is a summary:

Format         Sample Specification     Results
Exact          qtconsole==4.5.1         4.5.1
Fuzzy          qtconsole=4.5            4.5.0, 4.5.1, ..., etc.
>=, >, <, <=  "qtconsole>=4.5"          4.5.0 or higher
               qtconsole"<4.6"          less than 4.6.0

OR            "qtconsole=4.5.1|4.5.2"   4.5.1, 4.5.2
AND           "qtconsole>=4.3.1,<4.6"   4.3.1 or higher but less than 4.6.0

Potion of the above information credit to Conda Cheat Sheet

Tested on conda 4.7.12


To install a specific package:

conda install <pkg>=<version>

eg:

conda install matplotlib=1.4.3