The library itself mentions that it needs python 3.6 or higher.
- 1
The library itself mentions that it needs python 3.6 or higher.
nallath's observation saved my skin: h5py's latest version requires Python 3.6, so it can't run on Cura (Python 3.5.x). However, a previous version (2.10.0) is still compatible.
I've prepared a clean Windows 10 install (on a virtual machine to prevent any mix-up with different Python versions), There, I've installed the same Python version as Cura (3.5.4, 64 bit), pip-installed h5py 2.10.0, and copied the folder with the compiled files:
C:/Users/xxxx/AppData/Local/Programs/Python/Python35/Lib/site-packages/h5py
(might be Roaming instead of Local for some installs)
This folder can now be used as a Python package. For some reason, a simple import fails so I have to do this:
import os, sys dir = os.path.dirname(os.path.realpath(__file__)) #This script's path sys.path.append(dir) #Look for packages here import h5py f = h5py.File(testFile,"r")
I still need to ensure an old h5py version suits my needs, and later repeat the process for Linux and macOS.
5 hours ago, Tyronnosaurus said:I've prepared a clean Windows 10 install (on a virtual machine to prevent any mix-up with different Python versions)
Learn to love python virtualenv.
Recommended Posts
Tyronnosaurus 7
I noticed that the compiled files were made for Python 3.8. Since Cura comes with Pyton 3.5.0, I repeated the process but this time using h5py compiled in a Windows system with Python 3.5.0 installed.
This time, Cura crashes with this error:
[...] h5py = cdll.LoadLibrary(path) #This replaces the usual "import h5py". h5py is now a usable module File "ctypes\__init__.py", line 429, in LoadLibrary File "ctypes\__init__.py", line 351, in __init__ OSError: [WinError 193] %1 is not a valid Win32 application
Link to post
Share on other sites