conda相关的设置备忘

因为默认channel已经没有3.4.4(最后一个支持xp的python3)了,为了添加这个的版本,尝试先用conda-forge channel:

conda create -n myenv python=3.4 -c conda-forge

然后因为默认conda-forge最低只有3.4.5,所以需要开启free channel:

conda config --set restore_free_channel True

然后再指定3.4.4就可以了。不过接下来又碰到一个32位的问题。众所周知国内没有多少人用64位的xp。所以还需要切换一下conda的环境变量:

conda config --env --set subdir win-32

这里其实没有实际测试过,按照理解,上面这条指令可能是永久性写入配置文件的。所以如果为了方便,估计还是用set CONDA_SUBDIR=win-32

ref:

https://stackoverflow.com/questions/56850972/why-conda-cannot-create-environment-with-python-3-4-installed-in-it

https://stackoverflow.com/questions/57449169/how-to-install-deprecated-unsupported-python-3-4-on-conda-environment

https://stackoverflow.com/questions/33709391/using-multiple-python-engines-32bit-64bit-and-2-7-3-5

https://titanwolf.org/Network/Articles/Article?AID=25933ee7-9343-4045-ab83-74ebae601b92#gsc.tab=0

Conda is mixing 32-bit and 64-bit packages (platform is not stored in the conda environment) · Issue #1744 · conda/conda / https://github.com/conda/conda/issues/1744

原文地址:https://www.cnblogs.com/pyzh/p/conda-config-note.html