Registry / data / silx
library3.0.1pypypi✓ verified 89d ago

silx is a collection of Python packages to support the development of data assessment, reduction and analysis applications at synchrotron radiation facilities. It provides tools for reading HDF5/NeXus files, histogramming, fitting, 1D/2D visualization, and image processing. Current version is 3.0.0, with releases approximately every 6–12 months.

pip install silx
INSTALL
IMPORT
SIG · SILX
S
silx
datapythonv3.0.1
Install
9.4s avg
Import
20ms
Disk
362MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v3.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
build_error
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 9.4s · import 0.020s · 353MB
362MB installed
● package 362MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

silx
✓ import silx
utils
✓ from silx import utils
✗ from silx.utils import *
Avoid star imports; use explicit symbols.
io
✓ from silx.io import fabio_h5
✗ from silx.io import fabioh5
In older versions (pre-2.0) the module was named fabioh5; renamed to fabio_h5.
plot
✓ from silx.gui import plot
✗ from silx.plot import ...
The plotting module moved to silx.gui.plot in version 1.0.0.
OpenCL
✓ from silx.opencl import ocl
✗ from silx import ocl
OpenCL support is under silx.opencl, not top-level.

Basic imports and usage of silx: reading files, histogram, and plotting (GUI).

import silx import numpy as np from silx import sx from silx.io import fabio_h5 from silx.gui import plot # Read a HDF5/NeXus image import os filepath = os.environ.get('SILX_TEST_FILE', 'example.h5') if os.path.exists(filepath): data = fabio_h5.open(filepath) print(type(data)) # Simple histogram x = np.random.normal(size=1000) hist, edges = sx.histogram(x, bins=10) print('histogram:', hist) # Create a 1D plot window (GUI only if interactive) # plot1D = plot.Plot1D() # plot1D.addCurve(x, y) # plot1D.show()
Debug
Known issues
breakingIn silx 1.0.0, the old top-level modules (silx.plot, silx.io.fabioh5, silx.math) were reorganized. Code using old import paths will break.
fix
Update imports: silx.gui.plot instead of silx.plot; silx.io.fabio_h5 instead of silx.io.fabioh5; silx.math.histogram moved to silx.sx.histogram.
affects: <1.0
breakingsilx 2.0.0 dropped Python 2 support and removed deprecated APIs like silx.math.fit and silx.io.specfile.
fix
Use silx.sx.fit or external fitting libraries. Use silx.io.fabio_h5 or h5py directly for SPEC files.
affects: <2.0
gotchasilx.gui.plot requires a Qt backend. If no Qt bindings are installed (PyQt5, PySide2, etc.), importing silx.gui will raise an ImportError.
fix
Install a Qt binding: pip install silx[gui] or pip install PyQt5 (or PySide6).
affects: all
deprecatedFunctions in silx.math (like silx.math.histogram) are deprecated in favor of silx.sx functions.
fix
Replace calls: silx.math.histogram → silx.sx.histogram.
affects: >=2.0, <=3.0
gotchasilx.io.fabio_h5.open() returns a FabioFrame, not a numpy array. Access the data via .data attribute.
fix
Use fr = fabio_h5.open('file'); data = fr.data.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'silx.gui'
Qt bindings not installed.
fix
Install a Qt binding: pip install silx[gui] or pip install PyQt5.
ImportError: cannot import name 'fabioh5' from 'silx.io'
The module was renamed from fabioh5 to fabio_h5 in silx 1.0.
fix
Change import to: from silx.io import fabio_h5.
AttributeError: module 'silx' has no attribute 'plot'
The top-level silx.plot module was removed in silx 1.0.
fix
Use from silx.gui import plot instead.
OSError: [Errno 101] Network is unreachable: 'https://...'
silx tries to download a test file or load an online resource without internet.
fix
Disable online access or set environment variable SILX_DISABLE_NET=1.
Upgrade
Version history
3.0.1latest on PyPI · released May 7, 2026
Audit
Dependencies
fabiorequiredRequired for reading/writing detector image formats (e.g., EDF, TIFF, CBF).
h5pyrequiredRequired for HDF5/NeXus file I/O.
numpyrequiredCore dependency for arrays and math operations.
pyopencloptionalOptional GPU acceleration for image processing and histogramming.
Agent activity
29 hits · last 30 days
node
20
Anthropic
1
OpenAI (training)
1
Resources
silx — pip install silx · libregistry