question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows compatibility issues with dependencies

See original GitHub issue

Hi! As someone else posted on stackoverflow, there seem to be problems with the tables dependencies for windows users resulting in the following error when importing scanpy:

>>> import scanpy
...
File "C:\Miniconda3\envs\py36\lib\site-packages\scanpy\readwrite.py", line 9, in
import tables
File "C:\Miniconda3\envs\py36\lib\site-packages\tables__init__.py", line 131, in
from .file import File, open_file, copy_file
File "C:\Miniconda3\envs\py36\lib\site-packages\tables\file.py", line 35, in
from . import hdf5extension
ImportError: DLL load failed: The specified procedure could not be found.

I’ve also posted an answer suggestion there. Maybe you could require h5py to have a fixed older version like 2.8 to avoid this problem for other windows users. Downgrading to that version worked for me.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

10reactions
stefanpeidlicommented, Apr 28, 2021

In case anyone has this error again, here is what worked for me:

  • go to https://www.lfd.uci.edu/~gohlke/pythonlibs/ and download a .whl file for h5py. For python 3.6 on a 64bit windows OS this is the file h5py‑2.10.0‑cp36‑cp36m‑win_amd64.whl
  • with your conda environment activated, install that wheel file using python -m pip install --user --force-reinstall h5py‑2.10.0‑cp36‑cp36m‑win_amd64.whl (change the file name to the one you downloaded).
  • scanpy should work now

This worked on mine and also on a colleagues windows laptop.

I guess the problem is that you need a C++ compiler to build the necessary H5DF libraries. This works fine in UNIX based OS (Mac and Linux), but in windows you would need to download the most recent C++ compiler from some microsoft build tools website or alongside Visual Studio. So installing a prebuildt wheel for windows circumwents that problem. I wonder when h5py people will ever fix this for us poor Windows users.

1reaction
maarten-compbiocommented, Oct 28, 2021

Had this issue again recently using python 3.7, and the solution above wasn’t enough to solve it. Turns out I also needed to download the tables .whl file: pip install .\h5py-2.10.0-cp37-cp37m-win_amd64.whl .\tables-3.6.1-cp37-cp37m-win_amd64.whl numpy==1.20.0 --user --force-reinstall

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows compatibility issues with dependencies #454
Hi! As someone else posted on stackoverflow, there seem to be problems with the tables dependencies for windows users resulting in the following ......
Read more >
Compatibility Fixes for Windows 10, Windows 8 ...
You can fix some compatibility issues that are due to the changes made between Windows operating system versions. These issues can include ...
Read more >
Microsoft extends application compatibility promise to ...
Our Compatibility team engages partners on critical issues before ... as platform dependencies such as the latest Windows updates change.
Read more >
Use the Windows Compatibility Pack to port code - .NET Core
Some of the most common issues found when porting existing code from .NET Framework to .NET are dependencies on APIs and technologies that ......
Read more >
NET Framework & Windows OS versions
Learn about key features in each version of .NET Framework, including underlying CLR versions and versions installed by the Windows ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found