Is it possible to lock versions of packages in Anaconda?

前端 未结 2 1311
悲哀的现实
悲哀的现实 2020-12-29 08:44

I installed Anaconda 3 2.3.0 on Windows xp. It is supposed to be the last version of anaconda to support windows xp as it contains python 3.4.3, and python 3.4.x is the last

相关标签:
2条回答
  • 2020-12-29 09:14

    Try

    pip install <package name==version no*>
    

    for instance

    pip install musdb==0.2.*
    

    That would pin your package

    0 讨论(0)
  • 2020-12-29 09:24

    There are two bits to this. First, you can prevent conda from auto-updating by changing the configuration option auto_update_conda to False:

    conda config --set auto_update_conda False
    

    The other bit is to pin packages to certain versions. For those packages you don't want to update, you can pin the version by adding a line to a file called pinned (you might need to create it) in the environment's conda-meta directory. The syntax is

    [The code] below [placed in conda-meta/pinned] forces NumPy to stay on the 1.7 series, which is any version that starts with 1.7, and forces SciPy to stay at exactly version 0.14.2:

    numpy 1.7.*
    scipy ==0.14.2
    

    See the documentation for more information.

    0 讨论(0)
提交回复
热议问题