AnacondaRecipes / python-feedstock

A conda-smithy repository for python.
BSD 3-Clause "New" or "Revised" License
4 stars 7 forks source link

DLL not found with python=3.7.2=h8c8aaf0_2 (Windows) #17

Closed kne42 closed 5 years ago

kne42 commented 5 years ago

Starting with python=3.7.2=h8c8aaf0_2, our Windows builds are failing due to the DLL search path modification introduced in #14 somehow preventing one or more DLLs from being loaded properly. This was working fine in build 0.

Following is the full traceback of the import with CONDA_DLL_SEARCH_DEBUG=1:

CondaEcosystemModifyDllSearchPath() :: PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps;C:\Users\ContainerAdministrator\anaconda\Scripts;C:\Users\ContainerAdministrator\anaconda;C:\ProgramData\chocolately\bin
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\ProgramData\chocolately\bin)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Users\ContainerAdministrator\anaconda)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Users\ContainerAdministrator\anaconda\Scripts)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Program Files\Git\cmd)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\ProgramData\chocolatey\bin)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Windows\System32\WindowsPowerShell\v1.0)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Windows\System32\Wbem)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Windows)
CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(C:\Windows\system32)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\napari_gui\__init__.py", line 2, in <module>
    from .elements import Window, Viewer
  File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\napari_gui\elements\__init__.py", line 13, in <module>
    from ._window import Window
  File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\napari_gui\elements\_window.py", line 1, in <module>
    from PyQt5.QtWidgets import QMainWindow, QWidget, QHBoxLayout, QLabel
ImportError: DLL load failed: The specified module could not be found.

Not sure if this is a problem specific to PyQt5 DLLs or something else but regardless, I have ran tests pinning python=3.7.2=h8c8aaf0_0 which did not have this bug. Any help for workarounds/solving this would be greatly appreciated :)

mingwandroid commented 5 years ago

You have not activated your environment therefore things will not run. Please use the Anaconda Prompt.

kne42 commented 5 years ago

@mingwandroid I have acquired a Windows machine and am able to replicate this on Anaconda Prompt.

Steps to reproduce (conda=4.5.12):

$ conda create -yn pyqt5-test-build-2 python=3.7.2=h8c8aaf0_2 && conda activate pyqt5-test-build-2
$ pip install PyQt5=5.12
$ python -c "from PyQt5 import QtCore"

However, pinning build 0 instead results in no errors, so something must have broken in build 1 or 2.