nimpy
nimpy copied to clipboard
Nimpy cannot import modules with default python 3.12 install on Windows 11
I have a default installation of python 3.12, nim 2, and nimpy (via nimble) on Windows 11 and nimpy is unable to import any python modules and I receive the following error:
`Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings'
Current thread 0x0000396c (most recent call first): <no Python frame>`
I can import nimpy just fine, but importing using pyImport
or pyBuiltinsModule
gives the same result.
It gives me some info on my python path configuration. I tried setting the PYTHONPATH and PYTHONHOME environment variables explicitly to see if that would help but it doesn't. I am not knowledgeable enough about python or how interop works between nim/python so I am not sure if it's a nimpy issue or if it requires something specific on windows to work.
If I'm not doing something wrong, having instructions on what's needed to get up and running on windows 11 with the default setup would be lovely.