Reputation: 12194
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?
Upvotes: 262
Views: 608912
Reputation: 10698
If any of these characters: ' ', '>', '<', '|', '*'
are used, a single or double quotes must be used, e.g.:
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
means: "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
Portion of the above information credit to Conda Cheat Sheet
Tested on conda
4.7.12.
Upvotes: 118
Reputation: 101
Conda seems to be spinning for a long time (+5min) in "Solving environment" if I use an exact version:
$ conda install nodejs=18.16.0
It ran much faster if I loosen up the version a bit:
$ conda create -yn node18 'nodejs>=18,<19'
Upvotes: 0
Reputation: 31266
To install a specific package:
conda install <pkg>=<version>
eg:
conda install matplotlib=1.4.3
For more complex expressions, the relation can be quoted:
conda install 'matplotlib>=1.4.3'
# or
conda install "matplotlib>=1.4.3"
Upvotes: 295
Reputation: 5458
There is no version 1.3.0
for rope
. 1.3.0
refers to the package cached-property
. The highest available version of rope
is 0.9.4
.
You can install different versions with conda install package=version
. But in this case there is only one version of rope
so you don't need that.
The reason you see the cached-property
in this listing is because it contains the string "rope"
: "cached-p rope erty"
py35_0
means that you need python version 3.5
for this specific version. If you only have python3.4
and the package is only for version 3.5
you cannot install it with conda.
I am not quite sure on the defaults
either. It should be an indication that this package is inside the default conda channel.
Upvotes: 98