Skip to content

Strange import errors with Python 3.12 on Windows #104820

@pekkaklarck

Description

@pekkaklarck

I tried to test our project with Python 3.12 beta 1 on Windows but everything failed. After some debugging I noticed that module imports seem to fail when modules aren't on my C-drive:

C:\Users\peke>echo print(1) > test312.py C:\Users\peke>py -3.12 -c "import test312" 1 C:\Users\peke>e: E:\>echo print(1) > test312.py E:\>py -3.12 -c "import test312" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'test312' 

No problems with earlier Python versions:

E:\>py -3.11 -c "import test312" 1 

Not sure does it matter, but I'm running Windows on VirtualBox and that E-drive is mapped to a directory on the Linux host.

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions