New submission from Eric Cosatto <ecosa...@gmail.com>:
I have an application with embedded python. When trying to import numpy, or any other module that was installed by pip, it fails with error 'ModuleNotFoundError("No module named ...")'. Yet, on the command line python, all works fine. The problem is not in the PATH, as only specific files (those with .<pyver-platform>.pyd extensions, e.g. .cp37-win_amd64.pyd) cannot be found. Example1: numpy import numpy >> ImportError("No module named 'numpy.core._multiarray_umath') The line which fails is: from . import multiarray The file it is trying to load: C:\Program Files\Python37\Lib\site-packages\numpy\core_multiarray_umath.cp37-win_amd64.pyd Example 2: cv2 import cv2 >> ModuleNotFoundError("No module named 'cv2.cv2'") The line which fails is: from .cv2 import * The file it is trying to load: C:\Program Files\Python37\Lib\site-packages\cv2\cv2.cp37-win_amd64.pyd ---------- components: Extension Modules, Windows messages: 340808 nosy: ecosatto, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Embedded Python fails to import module files with version_platform extensions type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36716> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com