Message340808
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 |
|
Date |
User |
Action |
Args |
2019-04-24 22:07:39 | ecosatto | set | recipients:
+ ecosatto, paul.moore, tim.golden, zach.ware, steve.dower |
2019-04-24 22:07:39 | ecosatto | set | messageid: <1556143659.79.0.1234879845.issue36716@roundup.psfhosted.org> |
2019-04-24 22:07:39 | ecosatto | link | issue36716 messages |
2019-04-24 22:07:39 | ecosatto | create | |
|