Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clusters plotter is incompatible with pytorch on windows because of 'control' library #248

Closed
haesleinhuepf opened this issue May 1, 2023 · 3 comments

Comments

@haesleinhuepf
Copy link
Member

haesleinhuepf commented May 1, 2023

When installing napari-clusters-plotter and pytorch in the same conda environment, pytorch doesn't work unfortunately. The problem is that the library control breaks pytorch. control is installed because the clusters-plotter installs finesse, which depends on control. The issue only comes when installing the clusters-plotter using mamba or conda. The pip installation is fine.

finesse is listed under requirements on conda-forge, but not in requirements.txt or setup.py. I can confirm that installing it via pip doesn't cause the issue.

To reproduce set up an environment like this:

mamba create --name test10 python=3.9 napari-clusters-plotter -c conda-forge

mamba activate test10

mamba install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia

Run this python script:

import torch

Error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\haase\mambaforge\envs\test10\lib\site-packages\torch\__init__.py", line 122, in <module>
    raise err
OSError: [WinError 182] The operating system cannot run %1. Error loading "C:\Users\haase\mambaforge\envs\test10\lib\site-packages\torch\lib\nvfuser_codegen.dll" or one of its dependencies.

Figuring out dependencies

I used conda-tree to figure that out:

mamba create --name bio393 python=3.9 devbio-napari -c conda-forge
mamba activate bio393
mamba install -c conda-forge conda-tree
conda-tree whoneeds control

finesse

conda-tree whoneeds finesse

napari-clusters-plotter

See also

@haesleinhuepf haesleinhuepf changed the title clusters plotter is incompatible with pytorch on windows because of 'control clusters plotter is incompatible with pytorch on windows because of 'control' library May 1, 2023
@haesleinhuepf
Copy link
Member Author

I will make a new release on pypi and conda-forge to remove the finesse dependency. In case anybody thinks finesse should stay, please report issues.

haesleinhuepf added a commit to regro-cf-autotick-bot/napari-clusters-plotter-feedstock that referenced this issue May 1, 2023
@Cryaaa
Copy link
Collaborator

Cryaaa commented May 2, 2023

I don't even know that library and since it is not in the pip dependencies I'm fine with removing it

@Cryaaa
Copy link
Collaborator

Cryaaa commented Nov 28, 2023

Fixed in #274

@Cryaaa Cryaaa closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants