0

The statement

from PyQt5 import QtWidgets

yields ImportError: DLL load failed: The specified module could not be found., but the statement

from PyQt5 import sdklfjsdlfkj

yields ImportError: cannot import name 'dfgdfgdfg'. This is confusing to me, because it's not like in the first snippet I'm trying to import something from QtWidgets. I mean, the QWidgets module is either there or it isn't, right? How is it possible that it's there "enough" to avoid a cannot import name, but also not there enough to be able to import it?

Jack M
  • 4,769
  • 6
  • 43
  • 67
  • i could i magine PyQt5 isn't purely using python labraries but also c/c++, where it then says it needs the DLL when a c/c++ library is missing there – Jonas Wolff Sep 11 '18 at 12:36
  • Possible duplicate of [DLL load failed when importing PyQt5](https://stackoverflow.com/questions/42863505/dll-load-failed-when-importing-pyqt5) – Jonas Wolff Sep 11 '18 at 12:39
  • @JonasWolff That actually did solve the larger problem I was having, so thanks, but still this question as written doesn't really have anything to do with PyQt. – Jack M Sep 11 '18 at 12:57
  • so in 'from PyQt5 import sdklfjsdlfkj' your trying to import something which does not exist, in 'from PyQt5 import QtWidgets' you are indeed import an exsisting python module however it have to also use windows libraries/ c libraries, some those where not there, this leads to the message 'ImportError: DLL load failed: The specified module could not be found.' – Jonas Wolff Sep 11 '18 at 18:17

0 Answers0