webknossos-libs
webknossos-libs copied to clipboard
pin compatible numpy version // crash in wkcuber with Python 3.8
Ubuntu 20.04 WSL, fresh environment
(env) boergens@DESKTOP-4L0H931:~/wkcuber$ python -m wkcuber --scale 11.24,11.24,25 /mnt/c/Users/Kevin/Desktop/sample_40_prescan_488-1.tif asdf
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/boergens/wkcuber/env/lib/python3.8/site-packages/wkcuber/__main__.py", line 17, in <module>
from .converter import create_parser as create_conversion_parser
File "/home/boergens/wkcuber/env/lib/python3.8/site-packages/wkcuber/converter.py", line 24, in <module>
from .convert_nifti import create_parser as create_nifti_parser
File "/home/boergens/wkcuber/env/lib/python3.8/site-packages/wkcuber/convert_nifti.py", line 6, in <module>
import nibabel as nib
File "/home/boergens/wkcuber/env/lib/python3.8/site-packages/nibabel/__init__.py", line 65, in <module>
from . import nifti1 as ni1
File "/home/boergens/wkcuber/env/lib/python3.8/site-packages/nibabel/nifti1.py", line 26, in <module>
from .quaternions import fillpositive, quat2mat, mat2quat
File "/home/boergens/wkcuber/env/lib/python3.8/site-packages/nibabel/quaternions.py", line 31, in <module>
MAX_FLOAT = np.maximum_sctype(np.float)
File "/home/boergens/wkcuber/env/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'
(env) boergens@DESKTOP-4L0H931:~/wkcuber/env/lib/python3.8/site-packages$ ls
GitPython-3.1.30.dist-info fsspec-2022.11.0.dist-info pygments
PIL git pylab.py
Pillow-8.4.0.dist-info gitdb pyparsing
Pillow.libs gitdb-4.0.10.dist-info pyparsing-3.0.9.dist-info
PyWavelets-1.4.1.dist-info google python_dateutil-2.8.2.dist-info
PyYAML-6.0.dist-info google_auth-2.15.0-py3.9-nspkg.pth python_dotenv-0.19.2.dist-info
Pygments-2.14.0.dist-info google_auth-2.15.0.dist-info pywt
__pycache__ h11 requests
_cffi_backend.cpython-38-x86_64-linux-gnu.so h11-0.12.0.dist-info requests-2.28.1.dist-info
_yaml httpcore requests_oauthlib
aiohttp httpcore-0.13.7.dist-info requests_oauthlib-1.3.1.dist-info
aiohttp-3.8.3.dist-info httpx rfc3986
aiosignal httpx-0.18.2.dist-info rfc3986-1.5.0.dist-info
aiosignal-1.3.1.dist-info idna rich
anyio idna-3.4.dist-info rich-10.16.2.dist-info
anyio-3.6.2.dist-info imagecodecs rsa
asciitree imagecodecs-2022.12.24.dist-info rsa-4.9.dist-info
asciitree-0.3.3.egg-info imagecodecs.libs scikit_image-0.18.3.dist-info
async_timeout imageio scikit_image.libs
async_timeout-4.0.2.dist-info imageio-2.24.0.dist-info scikit_learn-0.24.2.dist-info
attr joblib scikit_learn.libs
attrs joblib-1.2.0.dist-info scipy
attrs-21.4.0.dist-info kiwisolver scipy-1.10.0.dist-info
boltons kiwisolver-1.4.4.dist-info scipy.libs
boltons-21.0.0.dist-info kubernetes setuptools
cachetools kubernetes-23.6.0.dist-info setuptools-44.0.0.dist-info
cachetools-5.2.1.dist-info loxun-2.0.egg-info six-1.16.0.dist-info
cattr loxun.py six.py
cattrs matplotlib skimage
cattrs-22.2.0.dist-info matplotlib-3.6.2-py3.8-nspkg.pth sklearn
certifi matplotlib-3.6.2.dist-info smmap
certifi-2022.12.7.dist-info mpl_toolkits smmap-5.0.0.dist-info
cffi multidict sniffio
cffi-1.15.1.dist-info multidict-6.0.4.dist-info sniffio-1.3.0.dist-info
charset_normalizer natsort tests
charset_normalizer-2.1.1.dist-info natsort-6.2.1.dist-info threadpoolctl-3.1.0.dist-info
cluster_tools networkx threadpoolctl.py
cluster_tools-0.11.1.dist-info networkx-2.8.8.dist-info tifffile
colorama nibabel tifffile-2022.10.10.dist-info
colorama-0.4.6.dist-info nibabel-2.5.2.dist-info typing_extensions-4.4.0.dist-info
commonmark nisext typing_extensions.py
commonmark-0.9.1.dist-info numcodecs universal_pathlib-0.0.19.dist-info
contourpy numcodecs-0.11.0.dist-info upath
contourpy-1.0.6.dist-info numpy urllib3
cycler-0.11.0.dist-info numpy-1.24.1.dist-info urllib3-1.26.13.dist-info
cycler.py numpy.libs webknossos
czifile oauthlib webknossos-0.11.1.dist-info
czifile-2019.7.2.dist-info oauthlib-3.2.2.dist-info websocket
dateutil packaging websocket_client-1.4.2.dist-info
dotenv packaging-23.0.dist-info wkcuber
easy_install.py pip wkcuber-0.11.1.dist-info
entrypoints-0.4.dist-info pip-20.0.2.dist-info wkw
entrypoints.py pkg_resources wkw-1.1.18.dist-info
exceptiongroup pkg_resources-0.0.0.dist-info yaml
exceptiongroup-1.1.0.dist-info psutil yarl
fasteners psutil-5.9.4.dist-info yarl-1.8.2.dist-info
fasteners-0.18.dist-info pyasn1 zarr
fontTools pyasn1-0.4.8.dist-info zarr-2.13.3.dist-info
fonttools-4.38.0.dist-info pyasn1_modules zipp
frozenlist pyasn1_modules-0.2.8.dist-info zipp-3.11.0.dist-info
frozenlist-1.3.3.dist-info pycparser
fsspec pycparser-2.21.dist-info
Let me know if you need further info
Hi, sorry for the issue. Please try a numpy version <=1.20, it seems like np.float vanished in recent versions. We'll fix it in the code as well to support newer versions.
Hi, that worked, thank you for your help!