我怎样才能在 Anaconda 中拥有两个不同的环境? (Python 3.7,一个 32 位和一个 64 位)

How can I have two different environments within Anaconda? (both Python 3.7, one 32bit and one 64bit)

我需要什么

除了我的 Anaconda 发行版中当前的 64 位之外,我还需要一个 32 位的 conda 环境。

我试过的

我已按照 . However set CONDA_FORCE_32BIT=1 did not work in my case, I've verified this by checking the bit version after build. Comments in the answer and other sources 中的步骤进行操作,建议它可能已被删除。

我也试过安装 32 位版本 Miniconda 但我在更改环境时遇到问题,因为它们都使用相同的名称 (base).

任何建议都会有所帮助!

谢谢

您可以在使用 conda create 时使用 --channel/-c 标志手动指定 32 位通道。

您只需为要使用的频道和子目录提供正确的 url。 --override-channels 标志阻止 64 位通道被拉入(应该无关紧要,但你永远不知道)。

conda create -n py32 python=3.7 -c https://repo.anaconda.com/pkgs/main/win-32 --override-channels
conda activate py32

对于你的情况,我建议安装 64 位版本的 Anaconda 或 Miniconda,然后创建 32 位环境。