Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA Windows test suite crash due to missing DLL #64

Closed
luisfabib opened this issue Nov 16, 2020 · 1 comment · Fixed by #65
Closed

GHA Windows test suite crash due to missing DLL #64

luisfabib opened this issue Nov 16, 2020 · 1 comment · Fixed by #65
Assignees
Labels
bug Something isn't working
Milestone

Comments

@luisfabib
Copy link
Collaborator

During the latest automatic test run on GHA, the following exception is raised during collection of the tests via pytest:

c:\hostedtoolcache\windows\python\3.8.6\x64\lib\site-packages\deerlab\dd_models.py:8: in <module>
    import scipy.special as spc
c:\hostedtoolcache\windows\python\3.8.6\x64\lib\site-packages\scipy\special\__init__.py:633: in <module>
    from . import _ufuncs
E   ImportError: DLL load failed while importing _ufuncs: The specified module could not be found.

This issue is present for all Python versions on Windows.

Upon closer inspection it seems that there was a non crashing error reported during the numpy installation:

Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.19.4
    Uninstalling numpy-1.19.4:
      Successfully uninstalled numpy-1.19.4
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\hostedtoolcache\\windows\\Python\\3.8.6\\x64\\Lib\\site-packages\\~umpy\\.libs\\libopenblas.NOIJJG62EMASZI6NYURL6JBKM4EVBGM7.gfortran-win_amd64.dll'
Consider using the `--user` option or check the permissions.

where there seems to be a permissions error. This is the first time that has happened for this workflow on GHA. This would explain the missing DLL when importing a Scipy module.

The quick way would be to just setup the DeerLab installation to be on a user-level with reduced privileges. This would also solve issues like #52.

@luisfabib luisfabib added the bug Something isn't working label Nov 16, 2020
@luisfabib luisfabib added this to the 0.13.0 milestone Nov 16, 2020
@luisfabib luisfabib self-assigned this Nov 16, 2020
@luisfabib
Copy link
Collaborator Author

After careful examination I found the source of the error. While it is true that the error

ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: (...)

appears in almost every install, it must be originating from some post-install script as the packages are actually properly installed. Still, ia user install using pipwin is not possible as the package does not implement that option.

The reason for the missing DLL files error

ImportError: DLL load failed while importing _ufuncs: The specified module could not be found.

is actually originating from the wrong Gohlke numpy wheels being installed. While DeerLab requires the pre-compiled numpy+mkl wheels, for some reason in the latest test run, the numpy-vanilla wheels had been installed. This is due to how pipwin handles the versions, it seems to download and install the latest version uploaded to the Gohlke repo (which right now seems to be the vanilla version).

In order to fix all these issues I patched my forked copy of pipwin and pointed the installer towards this repo instead of the oficial one. For now it seems to be working properly and with the DLL files being properly located after installation.

@luisfabib luisfabib linked a pull request Nov 20, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant