1. 程式人生 > 實用技巧 >conda相關的設定備忘

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