python32和python64共存实现

本文最后更新于 2023年9月26日。

Anaconda 使用 set CONDA_FORCE_32BIT=1 切换32位环境失败的解决方法

set CONDA_FORCE_32BIT=1

使用
conda info查看
还是win-64!!切换失败了啊,然后就找到了如下解决措施

解决措施

因为使用set命令设置环境变量在powershell中无效,所以我们更换如下命令即可

$Env:CONDA_FORCE_32BIT=1

这样就成功切换了。

然后创建虚拟环境
conda create -n python32 python=3.6

(base) PS E:\mydoc\sync_pc_home_work\pyfile\DataExtract> conda create -name python32bit python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- python32bit
Current channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
- https://conda.anaconda.org/conda-forge/win-32
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.