cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

Runtime error with cellpose 2.2 GUI on Win 7 [BUG]

Open twegier opened this issue 3 years ago • 7 comments

Hello, I installed cellpose 2.2 with GUI in isolated conda environment (conda version 23.1.0) on Windows 7 Professional SP1. The cellpose GUI runs just fine, but only until cellpose or conda is restarted. Then the following runtime error shows up when I try to run again the command "python -m cellpose": Cellpose_RunTimeError_afterAnacondaRestart I think the problem happens only on Win 7; I do not have it on my laptop with Win 10. Reinstallation with the same python did not help (I still can use it only until cellpose/conda is restarted). Reinstallation with other python versions or with downgraded PyQt5 was not successful at all. I am aware Win 7 is outdated but the two most powerful PCs that I have easy access to at work still run on Win7, so any chance to solve this problem would be great for me. If this is too time consuming, I will try to use jupyter notebook version (I hope it will work) or look for an access to a powerful PC with Win 10. thank you!

twegier avatar Jul 18 '23 08:07 twegier

Can you list the steps to reproduce this behavior? It sounds like it works half of the time?

mrariden avatar Jul 18 '23 16:07 mrariden

No, no, this is not what I meant. It works straight after installation, but not after software restart. Exact steps: 1.) create conda environment called cellpose2 with python 3.8 (I use conda 23.1.0 with python 3.7.6 in base environment). 2.) conda activate cellpose2 3.) python -m pip install cellpose[gui] 4.) python -m cellpose to start the cellpose GUI. After that cellpose works fine, as long as I need, until I close the software 5.) close the software by clicking "X" on top right corner of GUI 6.) (optional) conda deactivate then conda activate cellpose2 7.) python -m cellpose results in runtime error In other words: under Win 7 on my desktop I need to freshly install cellpose GUI every time I need to work with it. It is doable, installation takes a few minutes, but it is troublesome to work like that. One more strange thing: the platform says "win32" (see screenshot above). My PC is 64-bit.

twegier avatar Jul 19 '23 07:07 twegier

I have exactly the same issue, while trying to install CellPose on an old machine (W7SP1). The Anaconda is 2020.07-Windows-x86_64, with only one environment. Cellpose starts after the first installation, but after Anaconda is closed it throws this error when trying to run cellpose. If I delete the environment and do a full installation again, it again works, but only once. Twice I was able to run it by just repeatedly trying to call cellpose despite the error, but it's not reliable.

Corovaneer avatar Jul 20 '23 13:07 Corovaneer

@twegier can you make sure that you have the 64bit version of conda installed to match your OS?

Also, please share your conda environment with conda list after activating

mrariden avatar Jul 20 '23 17:07 mrariden

conda info says platform is "win-64". Below is the output of conda list in "cellpose2" environment: Name Version Build Channel ca-certificates 2023.05.30 haa95532_0
cachetools 5.3.1 pypi_0 pypi cellpose 2.2.2 pypi_0 pypi certifi 2023.5.7 pypi_0 pypi charset-normalizer 3.2.0 pypi_0 pypi colorama 0.4.6 pypi_0 pypi fastremap 1.13.5 pypi_0 pypi filelock 3.12.2 pypi_0 pypi google-api-core 2.11.1 pypi_0 pypi google-auth 2.22.0 pypi_0 pypi google-cloud-core 2.3.3 pypi_0 pypi google-cloud-storage 2.10.0 pypi_0 pypi google-crc32c 1.5.0 pypi_0 pypi google-resumable-media 2.5.0 pypi_0 pypi googleapis-common-protos 1.59.1 pypi_0 pypi idna 3.4 pypi_0 pypi imagecodecs 2023.3.16 pypi_0 pypi importlib-metadata 6.8.0 pypi_0 pypi jinja2 3.1.2 pypi_0 pypi libffi 3.4.4 hd77b12b_0
llvmlite 0.40.1 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mpmath 1.3.0 pypi_0 pypi natsort 8.4.0 pypi_0 pypi networkx 3.1 pypi_0 pypi numba 0.57.1 pypi_0 pypi numpy 1.24.4 pypi_0 pypi opencv-python-headless 4.8.0.74 pypi_0 pypi openssl 3.0.9 h2bbff1b_0
packaging 23.1 pypi_0 pypi pip 23.1.2 py38haa95532_0
protobuf 4.23.4 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pygments 2.15.1 pypi_0 pypi pyqt5 5.15.9 pypi_0 pypi pyqt5-qt5 5.15.2 pypi_0 pypi pyqt5-sip 12.12.1 pypi_0 pypi pyqtgraph 0.13.3 pypi_0 pypi python 3.8.17 h1aa4202_0
qtpy 2.3.1 pypi_0 pypi requests 2.31.0 pypi_0 pypi roifile 2023.5.12 pypi_0 pypi rsa 4.9 pypi_0 pypi scipy 1.10.1 pypi_0 pypi setuptools 67.8.0 py38haa95532_0
six 1.16.0 pypi_0 pypi sqlite 3.41.2 h2bbff1b_0
superqt 0.4.1 pypi_0 pypi sympy 1.12 pypi_0 pypi tifffile 2023.7.10 pypi_0 pypi torch 2.0.1 pypi_0 pypi tqdm 4.65.0 pypi_0 pypi typing-extensions 4.7.1 pypi_0 pypi urllib3 1.26.16 pypi_0 pypi vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
wheel 0.38.4 py38haa95532_0
zipp 3.16.2 pypi_0 pypi

twegier avatar Jul 21 '23 11:07 twegier

@twegier we're about to release an update to the pyqt versioning. We've only tested it with Windows 10, but you might be able to use it on Windows 7. You can install the code after activating your environment with: pip install git+https://github.com/mrariden/cellpose@qtpy_refactor or you can wait a few more days and try to upgrade when we pull the changes into the main branch.

mrariden avatar Aug 08 '23 00:08 mrariden

Closing due to inactivity, reopen if necessary

mrariden avatar Nov 03 '23 13:11 mrariden