= short test summary info = ERROR tests/integration_tests/test_cropimage.py - ImportError: DLL load failed while importing cv2: Le module spécifié est introuvable.ĮRROR tests/integration_tests/test_cropimage.py coverage: platform win32, python 3.9.2-final-0. Tests\integration_tests\test_cropimage.py:1: in Return _bootstrap._gcd_import(name, package, level) \.\.\Miniconda3\envs\standard\lib\importlib\_init_.py:127: in import_module Hint: make sure your test modules/packages have valid Python names. _ ERROR collecting tests/integration_tests/test_cropimage.py _ ImportError while importing test module 'C:\Users\francois\Documents\cpmt\tests\integration_tests\test_cropimage.py'. = ERRORS = _ ERROR collecting tests/integration_tests/test_cropimage.py _ tests\integration_tests\test_cropimage.py:1: in Į ImportError: DLL load failed while importing cv2: Le module spécifié est introuvable. Rootdir: C:\Users\francois\Documents\cpmt, configfile: pytest.ini, testpaths: testsĬollected 15 items / 2 errors / 13 selected = test session starts = platform win32 - Python 3.9.2, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 - C:\Users\francois\Miniconda3\envs\standard\python.exe | | - test_cropimage.py (tests cropimage.py)Īnd here is the full error message: pytest -assert=plain The directory structure is as follow: cpmt (root dir) Is there something I can to do fix it or at least give more useful information?ĮDIT: added the code showing the difference between cv2 and sklearn/numpy. In this case cv2 is also installed as a single file into the site-packages folder, but this time with a the. Note that this problem does not exist on Linux (same Python 3.9 / pytest-6.2.2 / conda). > C:\Users\francois\Miniconda3\envs\standard\lib\site-packages\numpy\_init_.py > C:\Users\francois\Miniconda3\envs\standard\lib\site-packages\sklearn\_init_.py > C:\Users\francois\Miniconda3\envs\standard\lib\site-packages\cv2.cp39-win_amd64.pyd pyd file put directly into the site-packages folder. It’s also the only one being installed as a single. I use various libraries like numpy, sklearn… and cv2 is the only one causing such error. This something I noticed with Python 3.9 / pytest-6.2.2 / conda / Windows: while import cv2 works on Python, it causes an ImportError (dll not found) when testing my code with pytest.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |