I created a 32-bit conda environment from my 64-bit root environment with the following commands:
set CONDA_FORCE_32BIT=1
conda create -n py37_32 python=3.7
I then activated the environment and installed numpy and pandas:
conda activate py37_32
conda install numpy pandas
I can see that the 32-bit versions of all the packages required are being used. After activating this environment I can run my application without any problems from the command line.
The problem arises when I try to use this environment in PyCharm. In the run configuration for my application I specified the python interpreter as a system interpreter with a path to python.exe of the environment as in this answer, but when I run this configuration I get:
Traceback (most recent call last):
File "C:/Users/patri/OneDrive - The University of Western Ontario/Combining Sectors Vensim/Scenarios/run_scenarios.py", line 1, in <module>
import venpy as vp
File "C:\Users\patri\Anaconda3\envs\py37_32\lib\site-packages\venpy\__init__.py", line 1, in <module>
from .venpy import load
File "C:\Users\patri\Anaconda3\envs\py37_32\lib\site-packages\venpy\venpy.py", line 14, in <module>
import numpy as np
File "C:\Users\patri\Anaconda3\envs\py37_32\lib\site-packages\numpy\__init__.py", line 140, in <module>
from . import _distributor_init
File "C:\Users\patri\Anaconda3\envs\py37_32\lib\site-packages\numpy\_distributor_init.py", line 34, in <module>
from . import _mklinit
ImportError: DLL load failed: %1 is not a valid Win32 application.
I don't know why this would be different from the command line other than maybe I'm not setting the interpreter for this configuration properly.
I can't create the environment in PyCharm directly as mentioned here because I need to specify 32-bit not just the python version.
Any thoughts on how to run a 32-bit conda environment in PyCharm? What could be the problem here?