- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm writing an app that does Py_InitializeEx(0) and that ends up calling exit()
'irisdb.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbols loaded without source information.
Fatal Python error: failed to get the Python codec of the filesystem encoding
'irisdb.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbols loaded without source information.
when I call PyInitializeEx(0) in the python39.dll that you ship.
My application works fine for conda which is based on python311/python311.dll now.
I'm not sure what I can change, this is basic embedded python.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the delay, We analyzed the problem and encountered the same failure for both Miniconda for Python 3.9 and IDP for 3.9.
After our observation, we concluded that since you got it to work for Python 3.11 with conda, We'll give you the benefit of the doubt that it's a problem with Python 3.9, and has nothing to do with IDP.
Please let us know If you find further issues.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Philip,
It appears that your application is functioning properly when using open-source Python 3.11, but encountering issues when using IntelPython 3.9. Please let me know if my understanding is wrong.
Please provide details about the operating system and steps to reproduce the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
zip file attached.
There are 2 visual studio simple projects: a Console App one and a DLL one.
There are 2 pythons you can use depending on an #if in the console project.
python.org 3.9, the working one results in this:
Hello World!
doing import numpy in dll:
hello from python
import done
C:\Users\pmilosla\source\repos\ConsoleApplication\x64\Release\ConsoleApplication.exe (process 16820) exited with code 0.
Press any key to close this window . . .
Your python results in this:
Hello World!
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = 'C:\\Users\\pmilosla\\source\\repos\\ConsoleApplication\\x64\\Release\\ConsoleApplication.exe'
sys.base_prefix = 'C:\\ProgramData\\intelpython3'
sys.base_exec_prefix = 'C:\\ProgramData\\intelpython3'
sys.platlibdir = 'lib'
sys.executable = 'C:\\Users\\pmilosla\\source\\repos\\ConsoleApplication\\x64\\Release\\ConsoleApplication.exe'
sys.prefix = 'C:\\ProgramData\\intelpython3'
sys.exec_prefix = 'C:\\ProgramData\\intelpython3'
sys.path = [
'C:\\ProgramData\\intelpython3\\python39.zip',
'.\\DLLs',
'.\\lib',
'C:\\Users\\pmilosla\\source\\repos\\ConsoleApplication\\x64\\Release',
]
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 0x00008e24 (most recent call first):
<no Python frame>
C:\Users\pmilosla\source\repos\ConsoleApplication\x64\Release\ConsoleApplication.exe (process 13100) exited with code 1.
Press any key to close this window . . .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for sharing the reproducible. We will keep you updated once we have any new information. Could you please provide us with more details about your environment, such as the version of Windows and Visual Studio that you are using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Win 11 Pro, visual studio 2022. I would be really surprised if that matters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for sharing the environment details. We will update you once we have an update
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We were able to reproduce the issue with intelpython3 and will update you as soon as we have more information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the delay, We analyzed the problem and encountered the same failure for both Miniconda for Python 3.9 and IDP for 3.9.
After our observation, we concluded that since you got it to work for Python 3.11 with conda, We'll give you the benefit of the doubt that it's a problem with Python 3.9, and has nothing to do with IDP.
Please let us know If you find further issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you happen to have a timeline for when you will update your product to be based on conda/python3.11 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In 2024.2, IDP will release Python 3.11 builds as online packages, which will receive necessary updates.
Please try using IDP version 3.10 and let us know if the issue persists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are closing this case, Please feel free to raise a new thread in case of further issues.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page