Importlib behaves differently when importing pyd file
My working directory d:\Works\Python\ has a package 'fitz' looks like this: fitz\ __init__.py fitz.py utils.py _fitz.pyd There is a statement in fitz.py: return importlib.import_module('fitz._fitz') It works fine under Python 3.4 interpreter: >>> import fitz >>> But under Python 3.8 I get an exception: >>> import fitz Traceback(... ... ... ImportError: DLL load failed while importing _fitz >>> I work under Windows7 64bit with Python 32bit. Can anyone help? --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: Importlib behaves differently when importing pyd file
Jach Feng wrote at 2022-11-15 22:52 -0800: >My working directory d:\Works\Python\ has a package 'fitz' looks like this: > >fitz\ >__init__.py >fitz.py >utils.py >_fitz.pyd > >There is a statement in fitz.py: >return importlib.import_module('fitz._fitz') > >It works fine under Python 3.4 interpreter: import fitz > >But under Python 3.8 I get an exception: import fitz >Traceback(... >... >... >ImportError: DLL load failed while importing _fitz The Python C-API is Python version dependent. Your `_fitz.pyd` may need to be recreated for Python 3.8. -- https://mail.python.org/mailman/listinfo/python-list