kevinjohncutler / omnipose

Omnipose: a high-precision solution for morphology-independent cell segmentation
https://omnipose.readthedocs.io
Other
85 stars 29 forks source link

Installing omnipose - cellpose conflict #50

Closed ebornet closed 11 months ago

ebornet commented 11 months ago

Hi, I installed omnipose as recommended conda create --name omnipose 'python>=3.8.5' pytorch conda activate omnipose pip install omnipose

When I run python -m omnipose I first get a prompt:

UserWarning: Failed to load image Python extension: 'libc10_cuda.so: cannot open shared object file: No such file or directory'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
  warn(
GUI ERROR: No module named 'PyQt6'
GUI dependencies may not be installed (normal for first run).
Install GUI dependencies? (Note: uses PyQt6.) (y/n):  

If i say y then, the following issue occurs:

INFO: pip is looking at multiple versions of cellpose-omni[gui] to determine which version is compatible with other requirements. This could take a while.
Collecting cellpose-omni[gui]
  Using cached cellpose_omni-0.7.3-py3-none-any.whl (196 kB)
  Using cached cellpose_omni-0.7.2-py3-none-any.whl (196 kB)
  Using cached cellpose_omni-0.7.0-py3-none-any.whl (195 kB)
  Using cached cellpose_omni-0.6.9-py3-none-any.whl (195 kB)
Collecting opencv-python==4.5.5.64 (from cellpose-omni[gui])
  Using cached opencv_python-4.5.5.64-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.5 MB)
Collecting cellpose-omni[gui]
  Using cached cellpose_omni-0.6.8-py3-none-any.whl (195 kB)
  Using cached cellpose_omni-0.6.7-py3-none-any.whl (195 kB)
ERROR: Cannot install cellpose-omni[gui]==0.6.7, cellpose-omni[gui]==0.6.8, cellpose-omni[gui]==0.6.9, cellpose-omni[gui]==0.7.0, cellpose-omni[gui]==0.7.2, cellpose-omni[gui]==0.7.3 and cellpose-omni[gui]==0.9.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    cellpose-omni[gui] 0.9.1 depends on omnipose-theme; extra == "gui"
    cellpose-omni[gui] 0.7.3 depends on omnipose-theme; extra == "gui"
    cellpose-omni[gui] 0.7.2 depends on omnipose-theme; extra == "gui"
    cellpose-omni[gui] 0.7.0 depends on omnipose-theme; extra == "gui"
    cellpose-omni[gui] 0.6.9 depends on omnipose-theme; extra == "gui"
    cellpose-omni[gui] 0.6.8 depends on omnipose-theme; extra == "gui"
    cellpose-omni[gui] 0.6.7 depends on omnipose-theme; extra == "gui"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/elise/anaconda3/envs/omnipose/lib/python3.11/site-packages/omnipose/__main__.py", line 3, in <module>
    main(omni_CLI=True)
  File "/home/elise/anaconda3/envs/omnipose/lib/python3.11/site-packages/cellpose_omni/__main__.py", line 191, in main
    install('cellpose-omni[gui]')
  File "/home/elise/anaconda3/envs/omnipose/lib/python3.11/site-packages/cellpose_omni/__main__.py", line 34, in install
    subprocess.check_call([sys.executable, "-m", "pip", "install", package])
  File "/home/elise/anaconda3/envs/omnipose/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/elise/anaconda3/envs/omnipose/bin/python', '-m', 'pip', 'install', 'cellpose-omni[gui]']' returned non-zero exit status 1.

Any idea of how this can be fixed ? Thanks for the help

ebornet commented 11 months ago

What seem to have fix this issue is to use conda create --name omnipose python=3.8.5 pytorch and running sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev