cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

Failed to run cellpose

Open myw12 opened this issue 6 years ago • 7 comments

Hello. I installed the newest Anaconda3 (version 2020.07) in Windows 8.1 and installed cellpose (GUI version) in a new environment with Python 3.7.7. When I try to run cellpose, I fail with the following message.

Traceback (most recent call last):
  File "C:\Users\~~\.conda\envs\cellpose\lib\runpy.py", line 193, i
n _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\~~\.conda\envs\cellpose\lib\runpy.py", line 85, in
 _run_code
    exec(code, run_globals)
  File "C:\Users\~~\.conda\envs\cellpose\lib\site-packages\cellpose
\__main__.py", line 7, in <module>
    from . import utils, models, io
  File "C:\Users\~~\.conda\envs\cellpose\lib\site-packages\cellpose
\io.py", line 4, in <module>
    import matplotlib.pyplot as plt
  File "C:\Users\~~\.conda\envs\cellpose\lib\site-packages\matplotl
ib\__init__.py", line 174, in <module>
    _check_versions()
  File "C:\Users\~~\.conda\envs\cellpose\lib\site-packages\matplotl
ib\__init__.py", line 159, in _check_versions
    from . import ft2font
ImportError: DLL load failed: The specified module could not be found.

Does this mean matplotlib couldn't import "ft2font"? Though I tried upgrading matplotlib, it didn't help. As I'm a beginner in Python/Anaconda, I'm happy if you give me any idea to solve this.

myw12 avatar Aug 23 '20 12:08 myw12

Hi there, @carsen-stringer @marius10p

I'm also having problems running Cellpose in conda environment. I'm getting a 'File not found' error. Can you please help me? Here's what happens:

(cellpose) mauromorais@mauro-mint:~/projects/python$ python -m cellpose downloading logo Traceback (most recent call last): File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/site-packages/cellpose/main.py", line 266, in main() File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/site-packages/cellpose/main.py", line 134, in main gui.run() File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/site-packages/cellpose/gui.py", line 110, in run utils.download_url_to_file('http://www.cellpose.org/static/images/cellpose_transparent.png', icon_path, progress=True) File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/site-packages/cellpose/utils.py", line 42, in download_url_to_file f = tempfile.NamedTemporaryFile(delete=False, dir=dst_dir) File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/tempfile.py", line 547, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/home/mauromorais/anaconda3/envs/cellpose/lib/python3.7/tempfile.py", line 258, in _mkstemp_inner fd = _os.open(file, flags, 0o600) FileNotFoundError: [Errno 2] Arquivo ou diretório inexistente: '/home/mauromorais/.cellpose/tmpi2cdw7v7'

My system info:

System: Host: mauro-mint Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic Conda: conda 4.8.3 Python: Python 3.7.7

Thanks, Mauro

mauroccm avatar Aug 30 '20 17:08 mauroccm

@myw12 can you try making an environment for cellpose if you didn't already using the environment.yml file?

conda env create -f environment.yml

I've recently removed all dependencies on matplotlib from the package and so the cellpose environment won't install it

@mauroccm apologies that was a recent bug I introduced when moving the logo file into the .cellpose folder. Please

pip install cellpose --upgrade

and try again

carsen-stringer avatar Aug 30 '20 21:08 carsen-stringer

@carsen-stringer Thank you for your reply. I tried yml file after I posted, but I encountered two different kinds of error.

  1. When I installed using environment.yml and ran last Thursday, I found the following message: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\(UserName)\\.cellpose\\tmp4v68fsbe' I tried to check the indicated file, but .cellpose folder was not created (not even hidden) in the current folder that I conducted install.

  2. When I tried running cellpose yesterday, the following error window appeared (somehow related to Bluetooth). My environment is Windows 8.1. Error_runningCellpose

Do you have any idea with these issues?

myw12 avatar Aug 31 '20 10:08 myw12

@mauroccm apologies that was a recent bug I introduced when moving the logo file into the .cellpose folder. Please

pip install cellpose --upgrade

and try again

Hi there! Thank you @carsen-stringer. It's working. Really cool app!

mauroccm avatar Aug 31 '20 12:08 mauroccm

This issue was solved. The Bluetooth API error was caused depending on PyQt5, so downgrading to PyQt5==5.9.2 worked to get rid of it (see https://github.com/winpython/winpython/issues/592). Finally I succeeded to run cellpose! Thanks!

@carsen-stringer Thank you for your reply. I tried yml file after I posted, but I encountered two different kinds of error.

1. When I installed using `environment.yml` and ran last Thursday, I found the following message:
   `FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\(UserName)\\.cellpose\\tmp4v68fsbe'`
   I tried to check the indicated file, but `.cellpose` folder was not created (not even hidden) in the current folder that I conducted install.

2. When I tried running cellpose yesterday, the following error window appeared (somehow related to Bluetooth). My environment is Windows 8.1.
   ![Error_runningCellpose](https://user-images.githubusercontent.com/70094521/91712863-9938ad80-ebc3-11ea-9b83-769cb49dea5a.JPG)

Do you have any idea with these issues?

myw12 avatar Sep 23 '20 07:09 myw12

This issue was solved. The Bluetooth API error was caused depending on PyQt5, so downgrading to PyQt5==5.9.2 worked to get rid of it (see winpython/winpython#592). Finally I succeeded to run cellpose! Thanks!

@carsen-stringer Thank you for your reply. I tried yml file after I posted, but I encountered two different kinds of error.

1. When I installed using `environment.yml` and ran last Thursday, I found the following message:
   `FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\(UserName)\\.cellpose\\tmp4v68fsbe'`
   I tried to check the indicated file, but `.cellpose` folder was not created (not even hidden) in the current folder that I conducted install.

2. When I tried running cellpose yesterday, the following error window appeared (somehow related to Bluetooth). My environment is Windows 8.1.
   ![Error_runningCellpose](https://user-images.githubusercontent.com/70094521/91712863-9938ad80-ebc3-11ea-9b83-769cb49dea5a.JPG)

Do you have any idea with these issues?

Hi, I also encounter the same problem, but cannot install PyQT5.9.2.

(cellpose) D:\GreenSoft\CondaPackages>pip install PyQt5==5.9.2
ERROR: Could not find a version that satisfies the requirement PyQt5==5.9.2 (fro
m versions: 5.10.1, 5.11.2, 5.11.3, 5.12, 5.12.1, 5.12.2, 5.12.3, 5.13.0, 5.13.1
, 5.13.2, 5.14.0, 5.14.1, 5.14.2, 5.15.0, 5.15.1, 5.15.2, 5.15.3, 5.15.4, 5.15.5
, 5.15.6, 5.15.7)
ERROR: No matching distribution found for PyQt5==5.9.2

Is this because I installed the Anaconda of python 3.9?

rmd13 avatar Aug 13 '22 19:08 rmd13

This issue was solved. The Bluetooth API error was caused depending on PyQt5, so downgrading to PyQt5==5.9.2 worked to get rid of it (see winpython/winpython#592). Finally I succeeded to run cellpose! Thanks!

@carsen-stringer Thank you for your reply. I tried yml file after I posted, but I encountered two different kinds of error.

1. When I installed using `environment.yml` and ran last Thursday, I found the following message:
   `FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\(UserName)\\.cellpose\\tmp4v68fsbe'`
   I tried to check the indicated file, but `.cellpose` folder was not created (not even hidden) in the current folder that I conducted install.

2. When I tried running cellpose yesterday, the following error window appeared (somehow related to Bluetooth). My environment is Windows 8.1.
   ![Error_runningCellpose](https://user-images.githubusercontent.com/70094521/91712863-9938ad80-ebc3-11ea-9b83-769cb49dea5a.JPG)

Do you have any idea with these issues?

Same problem as rmd13 and mauroccm. Trying to launch cellpose with python -m cellpose calls in Bluetooth API which is unavailable in Windows 8.1(?).

Googling leads to PyQt5 being the issue, however there was no PyQT5 in any of the site-packages folder of Python. pip install PyQt5==5.9.2 is no longer available to solve the issue mauroccm suggested. Installing previously absent PyQT5 is not fixing the issue, as is renaming the bluetooth libraries that came with it. I can't tell which part of the cellpose is calling for bluetooth, since no file inside the environment is named as obviously bluetooth-related.

Corovaneer avatar Aug 24 '22 10:08 Corovaneer