anaconda/conda - install a specific package version

后端 未结 3 2037
Happy的楠姐
Happy的楠姐 2020-12-04 15:05

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

(data_download         


        
相关标签:
3条回答
  • 2020-12-04 15:26

    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.

    0 讨论(0)
  • 2020-12-04 15:29

    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

    0 讨论(0)
  • 2020-12-04 15:35

    To install a specific package:

    conda install <pkg>=<version>
    

    eg:

    conda install matplotlib=1.4.3
    
    0 讨论(0)
提交回复
热议问题