T
T
Talyan2018-09-23 18:00:08
Python
Talyan, 2018-09-23 18:00:08

How to find the cause of an error in Python 2.7?

Hello. I am writing a bot program that performs certain actions, depending on what is happening on the screen.
I installed Python 2.7, the opencv library and other libraries on my PC.
To test the scripts, I created a virtual machine to run and test everything there while I could go about my business at the time.
But here's the trouble - after installing the same Windows 7 (x64) image on VirtualBox, the same packages that I installed myself (the same python, opencv, numpy - all from the same installation folder), an error began to appear when the script was launched:

File "C:\L2\bot-master\functions.py", line 7, in <module>
import cv2
ImportError: DLL load failed: DLL load failed: не найден указанный модуль

cv2.pyd itself is in the libraries folder. But what can I say here - I have already added everything that is possible to PATH:
C:\Python27\Scripts;
C:\Python27;
C:\Python27\DLLs;
C:\Python27\opencv\build\bin

- the error remains.
I tried to find where the python is breaking with the help of Dependcy Walker, but he swears that the python script is not an application.
How to understand what is wrong here? The OS is the same, the bit depth is the same, the packages installed are the same. The error thrown doesn't tell me anything - where python is looking for the library and what it doesn't like.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2018-09-23
@flapflapjack

The problem was solved in the following way:
Through Dependcy Walker, I opened the cv2.pyd library file itself and it pointed to the missing
api-ms-win-downlevel-shlwapi-l1-1-0.dll,
I downloaded it from the Internet and threw it into the python folder. Everything is working.
Damn, 2018 in the yard. Automation of missing packages cannot be done?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question