Skip to content

Can't load openCV when not in install dir with Windows 10 #225

@bebertii

Description

@bebertii

Expected behaviour

I have installed opencv-python with pip install opencv-python. with python 3.7.4 on an up-to-date Win10 64b.
openCV does work when the shell is on the install dir ('C:\Users\Gros\AppData\Local\Programs\Python\Python37')

Actual behaviour

But if I try to run a script outside of the install dir without having previously imported cv2 from the install dir, I'll have an error :
=========== RESTART: d:\Dropbox\2020\cours\2nde\pointage_video.py =========== Traceback (most recent call last): File "d:\Dropbox\2020\cours\2nde\pointage_video.py", line 15, in <module> import cv2 ImportError: DLL load failed: Le module spécifié est introuvable.

I added some folders to path :
C:\Users\Gros\AppData\Local\Programs\Python\Python37\Lib\site-packages\cv2 C:\Users\Gros\AppData\Local\Programs\Python\Python37\Lib C:\Users\Gros\AppData\Local\Programs\Python\Python37\Lib\site-packages C:\Users\Gros\AppData\Local\Programs\Python\Python37\Scripts C:\Users\Gros\AppData\Local\Programs\Python\Python37

No change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions