Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nimpy cannot import modules with default python 3.12 install on Windows 11 #301

Open
RattleyCooper opened this issue Mar 17, 2024 · 0 comments

Comments

@RattleyCooper
Copy link

RattleyCooper commented Mar 17, 2024

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):
`

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.

@RattleyCooper RattleyCooper changed the title Nimpy cannot import modules with default setup on Windows 11 Nimpy cannot import modules with default python 3.12 install on Windows 11 Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant