DigitalSlideArchive / HistomicsTK

A Python toolkit for pathology image analysis algorithms.
https://digitalslidearchive.github.io/HistomicsTK/
Apache License 2.0
394 stars 117 forks source link

HistomicsTK import numpy error #822

Closed jvizcar closed 4 years ago

jvizcar commented 4 years ago

When trying to import histomicstk after pip install (pip install histomicstk) in a conda environment with numpy already installed it cause the errors below.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jc/anaconda3/envs/hail/lib/python3.6/site-packages/histomicstk/__init__.py", line 7, in <module>
    from . import segmentation  # must be imported before features
  File "/home/jc/anaconda3/envs/hail/lib/python3.6/site-packages/histomicstk/segmentation/__init__.py", line 15, in <module>
    from . import label
  File "/home/jc/anaconda3/envs/hail/lib/python3.6/site-packages/histomicstk/segmentation/label/__init__.py", line 15, in <module>
    from .trace_object_boundaries import trace_object_boundaries
  File "/home/jc/anaconda3/envs/hail/lib/python3.6/site-packages/histomicstk/segmentation/label/trace_object_boundaries.py", line 4, in <module>
    from ._trace_object_boundaries_cython import _trace_object_boundaries_cython
  File "__init__.pxd", line 918, in init histomicstk.segmentation.label._trace_object_boundaries_cython
ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

For reference below is the yml file used to create the environment:

name: hail
channels:
  - conda-forge
  - anaconda
  - defaults
dependencies:
  - _libgcc_mutex=0.1=main
  - absl-py=0.8.1=py36_0
  - astor=0.8.0=py36_0
  - blas=1.0=mkl
  - bleach=1.5.0=py36_0
  - bzip2=1.0.8=h516909a_2
  - c-ares=1.15.0=h7b6447c_1001
  - ca-certificates=2019.11.27=0
  - cairo=1.16.0=h18b612c_1001
  - certifi=2019.11.28=py36_0
  - cloudpickle=1.2.2=py_1
  - cudatoolkit=9.0=h13b8566_0
  - cudnn=7.1.2=cuda9.0_0
  - cupti=9.0.176=0
  - cycler=0.10.0=py_2
  - cytoolz=0.10.1=py36h7b6447c_0
  - dask-core=2.9.2=py_0
  - dbus=1.13.6=he372182_0
  - decorator=4.4.1=py_0
  - expat=2.2.9=he1b5a44_0
  - ffmpeg=4.0=hcdf2ecd_0
  - fontconfig=2.13.1=he4413a7_1000
  - freeglut=3.0.0=hf484d3e_1005
  - freetype=2.10.0=he983fc9_1
  - gast=0.3.2=py_0
  - geos=3.8.0=he1b5a44_0
  - gettext=0.19.8.1=hc5be6a0_1002
  - glib=2.63.1=h5a9c865_0
  - graphite2=1.3.13=hf484d3e_1000
  - grpcio=1.16.1=py36hf8bcb03_1
  - gst-plugins-base=1.14.5=h0935bb2_1
  - gstreamer=1.14.5=h36ae1b5_1
  - harfbuzz=1.8.8=hffaf4a1_0
  - hdf5=1.10.2=hc401514_3
  - html5lib=0.9999999=py36_0
  - icu=58.2=hf484d3e_1000
  - imageio=2.6.1=py36_0
  - imgaug=0.3.0=py_0
  - intel-openmp=2019.4=243
  - jasper=2.0.14=habb8e15_1
  - joblib=0.14.1=py_0
  - jpeg=9c=h14c3975_1001
  - kiwisolver=1.1.0=py36he6710b0_0
  - ld_impl_linux-64=2.33.1=h53a641e_7
  - libedit=3.1.20181209=hc058e9b_0
  - libffi=3.2.1=hd88cf55_4
  - libgcc-ng=9.1.0=hdf63c60_0
  - libgfortran=3.0.0=1
  - libgfortran-ng=7.3.0=hdf63c60_4
  - libglu=9.0.0=hf484d3e_1000
  - libiconv=1.15=h516909a_1005
  - libopenblas=0.3.7=h5ec1e0e_6
  - libopencv=3.4.2=hb342d67_1
  - libopus=1.3=h7b6447c_0
  - libpng=1.6.37=hed695b0_0
  - libprotobuf=3.11.2=hd408876_0
  - libstdcxx-ng=9.1.0=hdf63c60_0
  - libtiff=4.1.0=hc3755c2_3
  - libuuid=2.32.1=h14c3975_1000
  - libvpx=1.7.0=h439df22_0
  - libxcb=1.13=h14c3975_1002
  - libxml2=2.9.9=hea5a465_1
  - libxslt=1.1.33=h7d1a2b0_0
  - lxml=4.4.2=py36hefd8a0e_0
  - lz4-c=1.8.3=he1b5a44_1001
  - markdown=3.1.1=py36_0
  - matplotlib=3.1.1=py36h5429711_0
  - mkl=2018.0.3=1
  - mkl_fft=1.0.6=py36h7dd41cf_0
  - mkl_random=1.0.1=py36h4414c95_1
  - ncurses=6.1=he6710b0_1
  - networkx=2.4=py_0
  - numpy=1.15.4=py36h1d66e8a_0
  - numpy-base=1.15.4=py36h81de0dd_0
  - olefile=0.46=py_0
  - opencv=3.4.2=py36h6fd60c2_1
  - openssl=1.1.1=h7b6447c_0
  - pcre=8.43=he1b5a44_0
  - pillow=7.0.0=py36hb39fc2d_0
  - pip=20.0.2=py36_0
  - pixman=0.38.0=h516909a_1003
  - protobuf=3.11.2=py36he6710b0_0
  - pthread-stubs=0.4=h14c3975_1001
  - py-opencv=3.4.2=py36hb342d67_1
  - pyparsing=2.4.6=py_0
  - pyqt=5.9.2=py36h05f1152_2
  - python=3.6.10=h0371630_0
  - python-dateutil=2.8.1=py_0
  - pytz=2019.3=py_0
  - pywavelets=1.1.1=py36h7b6447c_0
  - qt=5.9.7=h52cfd70_2
  - readline=7.0=h7b6447c_5
  - scikit-image=0.15.0=py36he6710b0_0
  - scipy=1.0.0=py36hbf646e7_0
  - setuptools=45.1.0=py36_0
  - shapely=1.6.4=py36hc5e8c75_0
  - sip=4.19.8=py36hf484d3e_0
  - six=1.14.0=py36_0
  - sqlite=3.30.1=h7b6447c_0
  - tbb=2019.8=hfd86e86_0
  - tbb4py=2019.8=py36hfd86e86_0
  - tensorboard=1.7.0=py36hf484d3e_1
  - tensorflow-gpu=1.7.0=0
  - tensorflow-gpu-base=1.7.0=py36hcdda91b_1
  - termcolor=1.1.0=py36_1
  - tk=8.6.8=hbc83047_0
  - toolz=0.10.0=py_0
  - tornado=6.0.3=py36h7b6447c_0
  - werkzeug=0.16.0=py_0
  - wheel=0.33.6=py36_0
  - xorg-fixesproto=5.0=h14c3975_1002
  - xorg-inputproto=2.3.2=h14c3975_1002
  - xorg-kbproto=1.0.7=h14c3975_1002
  - xorg-libice=1.0.10=h516909a_0
  - xorg-libsm=1.2.3=h84519dc_1000
  - xorg-libx11=1.6.9=h516909a_0
  - xorg-libxau=1.0.9=h14c3975_0
  - xorg-libxdmcp=1.1.3=h516909a_0
  - xorg-libxext=1.3.4=h516909a_0
  - xorg-libxfixes=5.0.3=h516909a_1004
  - xorg-libxi=1.7.10=h516909a_0
  - xorg-libxrender=0.9.10=h516909a_1002
  - xorg-renderproto=0.11.1=h14c3975_1002
  - xorg-xextproto=7.3.0=h14c3975_1002
  - xorg-xproto=7.0.31=h14c3975_1007
  - xz=5.2.4=h14c3975_4
  - zlib=1.2.11=h7b6447c_3
  - zstd=1.4.4=h3b9ef0a_1
  - pip:
    - openslide-python==1.1.1
manthey commented 4 years ago

@jvizcar Can you try again, installing from the appropriate wheel from circleci? https://circleci.com/gh/DigitalSlideArchive/HistomicsTK/916#artifacts/containers/0 You should be able to download the whl file and pip install from that file.

If that works, please approve PR #823.

jvizcar commented 4 years ago

Thanks, that worked.