CellProfiler / python-bioformats

Read and write life sciences file formats
Other
125 stars 45 forks source link

Conda fails to install python-bioformats- incompatible with python 3? #142

Open markemus opened 3 years ago

markemus commented 3 years ago

I tried this in two environments, first with python3.9 and czifile installed, and then again in a fresh environment with python3.6. Same error.

conda install -c bioconda python-bioformats

returns

failed                                                                                 

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - python-bioformats -> python[version='<3']

Your python: python=3.9

Does the conda version not support python3 for some reason? I see it's been updated recently so I'd be surprised.

markemus commented 3 years ago

After further testing, I was able to conda install -c bioconda python-bioformats successfully in a Python 2 conda environment. That doesn't really work for us so hopefully someone is able to clarify- I know python-bioformats supports Python 3, so why does the conda version not support it? Is there another version I should be installing instead?

michaelmell commented 3 years ago

@markemus I just ran into this issue as well with same error-message. Did you find a solution or work-around? Regarding Python 3 support I only found this pull-request. From the discussion there (particularly the last post), I am not sure that it supports Python 3. Is this stated somewhere? (in other words: what makes you so sure it supports Python 3, before I continue trying it...)

markemus commented 3 years ago

@michaelmell We have python-bioformats 4.0.0 installed with pip3 in Python 3.6.9 on another system- I didn't install it myself, but I don't think they had any trouble and it works fine.

Python3 is also listed as an option in the setup.py file: https://github.com/CellProfiler/python-bioformats/blob/master/setup.py

CotarP commented 2 years ago

I don't know if it is still relevant but I had similar issue on windows 10. The only way I managed to install it is to first install javabridge (not all python versions are supported, I'm working with 3.7): https://anaconda.org/zacsimile/python-javabridge and than install python-bioformats: https://anaconda.org/bioconda/python-bioformats

braymp commented 2 years ago

I'm running python 3.9. Using https://github.com/CellProfiler/CellProfiler/blob/master/setup.py#L64, I installed as much as I could with conda/mamba but found that some required pip as the proper versions were not available at any of the conda repos: python-bioformats==4.0.5 matplotlib<2.0.0 cellprofiler-core==4.2.1 pyzmq==18.0.1

A couple of notes:

Traceback (most recent call last): File "C:\Users\brayma2.conda\envs\py38\Scripts\cellprofiler-script.py", line 33, in sys.exit(load_entry_point('CellProfiler', 'console_scripts', 'cellprofiler')()) File "C:\Users\brayma2.conda\envs\py38\Scripts\cellprofiler-script.py", line 25, in importlib_load_entry_point return next(matches).load() File "C:\Users\brayma2.conda\envs\py38\lib\importlib\metadata.py", line 77, in load module = import_module(match.group('module')) File "C:\Users\brayma2.conda\envs\py38\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "c:\users\brayma2\onedrive - novartis pharma ag\github\cellprofiler\master\cellprofiler__main.py", line 14, in import h5py File "C:\Users\brayma2.conda\envs\py38\lib\site-packages\h5py\init__.py", line 33, in from . import version File "C:\Users\brayma2.conda\envs\py38\lib\site-packages\h5py\version.py", line 15, in from . import h5 as _h5 File "h5py\h5.pyx", line 1, in init h5py.h5 ImportError: DLL load failed while importing defs: The specified procedure could not be found.