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

Conda UnsatisfiableError: The following specifications were found to be incompatible with your CUDA driver #55

Closed
KevinMusgrave opened this issue Apr 15, 2020 · 32 comments
Labels
help wanted Extra attention is needed pip/conda Issues related to pip and conda installation

Comments

@KevinMusgrave
Copy link
Owner

KevinMusgrave commented Apr 15, 2020

Fix the following conda errors (not sure if they are reproducible errors):

Windows:

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your CUDA driver:

  - feature:/win-64::__cuda==10.2=0
  - feature:|@/win-64::__cuda==10.2=0

Your installed CUDA driver is: 10.2

Linux:

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your CUDA driver:

  - feature:/linux-64::__cuda==10.1=0
  - feature:|@/linux-64::__cuda==10.1=0

Your installed CUDA driver is: 10.1
@KevinMusgrave KevinMusgrave added enhancement New feature or request bug Something isn't working labels Apr 15, 2020
@KevinMusgrave KevinMusgrave changed the title Improve pip and conda installations Improve pip and conda installations, fix Windows version Apr 15, 2020
@KevinMusgrave KevinMusgrave added the help wanted Extra attention is needed label Apr 15, 2020
@KevinMusgrave KevinMusgrave changed the title Improve pip and conda installations, fix Windows version Improve pip and conda installations, investigate conda errors Apr 16, 2020
@KevinMusgrave KevinMusgrave removed the enhancement New feature or request label Apr 16, 2020
@KevinMusgrave KevinMusgrave changed the title Improve pip and conda installations, investigate conda errors Conda UnsatisfiableError: The following specifications were found to be incompatible with your CUDA driver Apr 16, 2020
@pjgoodall
Copy link

I am having similar problems on Ubuntu 18.04.v
flipping from Python > 3.7 to Python > 3.8 broke relationships between many packages.
Was I wrong to think 3.8 is now mainstream?
conda_conflicts.txt

[...]
The following specifications were found to be incompatible with your CUDA driver:

  - feature:/linux-64::__cuda==10.1=0
  - feature:|@/linux-64::__cuda==10.1=0

Your installed CUDA driver is: 10.1
nvidia-smi  | grep Version
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |

@KevinMusgrave
Copy link
Owner Author

@pjgoodall Have you come across this issue when installing other conda packages?

@pjgoodall
Copy link

I'm just rebuilding that environment with Python 3.7. WIlling to try any experiments you like.
The 3.7 config failed. There were some nvidia updates came through this-morning. Perhaps they are related. I will try a similar 3.7 config I was using yesterday and see if I can and rebuild it.

nvidia package updates:

| 2020-05-01 08:12:06 upgrade nvidia-settings:amd64 390.77-0ubuntu0.18.04.1 440.44-0ubuntu0.18.04.1                                      │
│2020-05-01 08:12:06 status half-configured nvidia-settings:amd64 390.77-0ubuntu0.18.04.1                                               │
│2020-05-01 08:12:06 status unpacked nvidia-settings:amd64 390.77-0ubuntu0.18.04.1                                                      │
│2020-05-01 08:12:06 status half-installed nvidia-settings:amd64 390.77-0ubuntu0.18.04.1                                                │
│2020-05-01 08:12:06 status half-installed nvidia-settings:amd64 390.77-0ubuntu0.18.04.1                                                │
│2020-05-01 08:12:06 status unpacked nvidia-settings:amd64 440.44-0ubuntu0.18.04.1                                                      │
│2020-05-01 08:12:06 status unpacked nvidia-settings:amd64 440.44-0ubuntu0.18.04.1                                                      │
│2020-05-01 08:12:06 configure nvidia-settings:amd64 440.44-0ubuntu0.18.04.1 <none>                                                     │
│2020-05-01 08:12:06 status unpacked nvidia-settings:amd64 440.44-0ubuntu0.18.04.1                                                      │
│2020-05-01 08:12:06 status unpacked nvidia-settings:amd64 440.44-0ubuntu0.18.04.1                                                      │
│2020-05-01 08:12:06 status half-configured nvidia-settings:amd64 440.44-0ubuntu0.18.04.1                                               │
│2020-05-01 08:12:06 status installed nvidia-settings:amd64 440.44-0ubuntu0.18.04.1     

@pjgoodall
Copy link

@KevinMusgrave
Flipping between 3.7 and 3.8 in this environment.yml seems to cause the problem reliably.
Moving between variants with conda env update --file ./environment.yml --prune

Went from 3.7 to a fail on 3.8, and back to success on 3.7. Have also tried creating environments from scratch, with apparently identical results.
A lot of conda solver computation trying to get to 3.8.
environment.zip

@KevinMusgrave
Copy link
Owner Author

That's strange, I'll try to look into this more when I get the time. Thanks for posting your findings!

@Hanros94
Copy link

Hi Kevin

I have the same problem as you, have you found the solution?

@KevinMusgrave
Copy link
Owner Author

KevinMusgrave commented May 11, 2020

I haven't gotten around to fixing this. For now, if you want to use this package inside conda, you'll have to do:

conda install pip
pip install pytorch-metric-learning

@Hanros94
Copy link

Oh ok cheers for the information

@KevinMusgrave KevinMusgrave added pip/conda Issues related to pip and conda installation and removed bug Something isn't working labels May 11, 2020
@KevinMusgrave
Copy link
Owner Author

@Hanros94 Did pip installation work for you?

@KevinMusgrave
Copy link
Owner Author

KevinMusgrave commented May 11, 2020

@pjgoodall Python 3.8 vs 3.7 seems to be an issue with this other package as well.

@Hanros94
Copy link

I'm not trying to install this specific package, I was just getting the same error. I'm using python 3.7.6

@KevinMusgrave
Copy link
Owner Author

@Hanros94 When you try to install this package, do you get the error?

@Hanros94
Copy link

which command do you want me to try?

@KevinMusgrave
Copy link
Owner Author

conda install pytorch-metric-learning -c metric-learning

@Hanros94
Copy link

I'm getting the same error as you:

Available versionsThe following specifications were found to be incompatible with your CUDA driver:

  • feature:/win-64::__cuda==8.0=0
  • feature:|@/win-64::__cuda==8.0=0

Your installed CUDA driver is: 8.0

@Hanros94
Copy link

my conda version is obviously earlier however I'm making use of anaconda prompt and python 3.7.6

@KevinMusgrave
Copy link
Owner Author

I see, that's a bummer. I was hoping it was a python 3.8 vs 3.7 issue. Unfortunately this is hard to debug because the error message is so cryptic.

@mick-d
Copy link

mick-d commented May 13, 2020

I had a similar error for a completely unrelated package (cf this issue comment) and this turns out not related to CUDA. The reason was because one of the dependency was not available for python 3.8 and had the constraint python<3.8.0a0 (cf conda-forge/dcmstack-feedstock/issues/12).

So not sure this is the case for you but it may be that one of the dependency is not yet available for python 3.8.

@Hanros94
Copy link

Ok that sounds great, I'm using python 3.7.6 however.

@mick-d
Copy link

mick-d commented May 14, 2020

@Hanros94 I just meant that you may need a lower python version (not necessarily 3.7 instead of 3.8).

However it turns out this is exactly the same situation. Your conda repo does not work with python 3.8 but it works with python 3.7 (more precisely 3.7.6), i just tested it:

conda create -n pml376 python=3.7.6
conda activate pml376
conda install pytorch-metric-learning -c metric-learning

Since 3.7.6 is the latest for python 3.7, you could also simply do:

conda create -n pml37 python=3.7
conda activate pml37
conda install pytorch-metric-learning -c metric-learning

@KevinMusgrave
Copy link
Owner Author

KevinMusgrave commented May 14, 2020

@mick-d Do you know if it matters which version of python I'm using when running conda-build? I'm using python 3.7.6. I mean if I use conda-build in a python 3.8 environment, I wonder if that would fix it. The dependencies for this package are widely used, and I doubt they don't support 3.8.

@mick-d
Copy link

mick-d commented May 15, 2020

@KevinMusgrave Sorry i am not sure about conda-build, but i wouldn't discard the python version angle as the problem can happen to pytorch itself as you can see from this post

@KevinMusgrave
Copy link
Owner Author

KevinMusgrave commented May 15, 2020

@mick-d I created a python 3.8 environment, then tried installing conda-build. Got this error:

Specifications:

  - conda-build -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']

Your python: python=3.8

...

The following specifications were found to be incompatible with your CUDA driver:

  - feature:/linux-64::__cuda==10.1=0

Your installed CUDA driver is: 10.1

Lmao!

Looks like conda-build isn't ready for python 3.8, so I guess I'll have to wait to try that experiment.

Edit: Actually it looks like conda install conda-forge::conda-build might work so I'm going to try that.

2nd edit Built it with conda-build in a python 3.8 environment. For me, it installs on Linux, python 3.7.7, but still fails on python 3.8.

@KevinMusgrave
Copy link
Owner Author

KevinMusgrave commented May 16, 2020

I think I finally fixed it, and it was an error in the way I was building the package.

For any other conda-building-noobs out there, here's what my old meta.yaml looked like:

{% set name = "pytorch-metric-learning" %}
{% set version = "0.9.86" %}

package:
  name: "{{ name|lower }}"
  version: "{{ version }}"

source:
  url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
  sha256: "f7327b3314bfccf930c25ea47be78540730106a301ef12fd920a72defadd4247"

build:
  number: 0
  script: "python -m pip install . --no-deps --ignore-installed -vv "

requirements:
  host:
  run:
    - python >=3.0
    - numpy
    - scikit-learn
    - tqdm
    - pytorch
    - torchvision

about:
  home: "https://github.com/KevinMusgrave/pytorch-metric-learning"
  license: "MIT"
  license_family: "MIT"
  license_file: ""
  summary: "The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch."
  doc_url: "https://kevinmusgrave.github.io/pytorch-metric-learning"
  dev_url: ""

extra:
  recipe-maintainers:
    - KevinMusgrave

And here's what my new meta.yaml looks like:

{% set name = "pytorch-metric-learning" %}
{% set version = "0.9.86" %}

package:
  name: "{{ name|lower }}"
  version: "{{ version }}"

source:
  url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
  sha256: f7327b3314bfccf930c25ea47be78540730106a301ef12fd920a72defadd4247

build:
  number: 0
  script: "{{ PYTHON }} -m pip install . -vv"
  noarch: python

requirements:
  host:
    - numpy
    - pip
    - python >=3.6
    - scikit-learn
    - pytorch
    - torchvision
    - tqdm
  run:
    - numpy
    - python >=3.6
    - scikit-learn
    - pytorch
    - torchvision
    - tqdm

test:
  imports:
    - pytorch_metric_learning
    - pytorch_metric_learning.losses
    - pytorch_metric_learning.miners
    - pytorch_metric_learning.regularizers
    - pytorch_metric_learning.samplers
    - pytorch_metric_learning.testers
    - pytorch_metric_learning.trainers
    - pytorch_metric_learning.utils

about:
  home: "https://github.com/KevinMusgrave/pytorch-metric-learning"
  license: "MIT"
  license_family: "MIT"
  license_file: ""
  summary: "The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch."
  doc_url: "https://kevinmusgrave.github.io/pytorch-metric-learning"
  dev_url: ""

extra:
  recipe-maintainers:
    - KevinMusgrave

The build command that works is: conda-build -c pytorch $pkg, which is what I was doing before. (The new build script can be found here)

The old installation command that failed was:
conda install pytorch-metric-learning -c metric-learning

The new command that works is:
conda install pytorch-metric-learning -c metric-learning -c pytorch

I have tested this on Linux python 3.7 and 3.8.

@JananiPrabu
Copy link

While installing the fbprophet package, I am receiving the same error

what can I do?

@KevinMusgrave
Copy link
Owner Author

@JananiPrabu The above solution has to do with my own package building error, so I can't help with fbprophet. You should open an issue in their git repo, which I assume is this: https://github.com/facebook/prophet

@kmshort
Copy link

kmshort commented Aug 27, 2020

Fresh install of Anaconda Python 3.8 here, on Windows 10:2004. Accepted all defaults, straight to an anaconda 64 prompt:

> conda install bioconda deeptools

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your CUDA driver:

  - feature:/win-64::__cuda==10.2=0

Your installed CUDA driver is: 10.2

Something is very broken here, and it isn't just one package.

@KevinMusgrave
Copy link
Owner Author

@kmshort Hmm, yeah I may have gotten lucky with my fix. To be honest I don't understand how the conda build system works. Anyway, I would open an issue in the conda, bioconda, and deeptools repos.

@ghuname
Copy link

ghuname commented Oct 16, 2020

I have just created a new conda environment for python 3.9.0 with:

conda create -c conda-forge python=3.9 -n py390

After activating py390 environment I tried to install pandas with:

conda install pandas

but I got:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining @/win-64::__cuda==11.0=0:  67%|████████████████████████████████                | 2/3 [00:02<00:01,  1.15s/it]-failed

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

Specifications:

  - pandas -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0']

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your system:

  - feature:/win-64::__cuda==11.0=0
  - feature:|@/win-64::__cuda==11.0=0

Your installed version is: 11.0

@IvanPrzOl
Copy link

@ghuname I've got the same error, but it works if I install pandas from the conda-forge channel

@Benzidrine
Copy link

Benzidrine commented Nov 14, 2020

Seeing the same error with conda install requests over here. conda-forge works though.

@Maria-UET
Copy link

I haven't gotten around to fixing this. For now, if you want to use this package inside conda, you'll have to do:

conda install pip
pip install pytorch-metric-learning

This worked for me.
My environment:

  • Windows10
  • Python 3.9
  • Pytorch 1.10.2
  • No Cuda (CPU version)

Tried installing PyG with pip with command:
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.10.2+cpu.html

Also tried conda:
conda install pyg -c pyg

Kept getting the same error while importing torch-geometric or torch-scatter in Python. Error was:

~\AppData\Local\Temp/ipykernel_11320/2056699366.py in <module>
----> 1 from torch_geometric.data import Data

~\AppData\Local\Continuum\anaconda3\envs\ds\lib\site-packages\torch_geometric\__init__.py in <module>
      2 from importlib import import_module
      3 
----> 4 import torch_geometric.data
      5 import torch_geometric.loader
      6 import torch_geometric.transforms

~\AppData\Local\Continuum\anaconda3\envs\ds\lib\site-packages\torch_geometric\data\__init__.py in <module>
----> 1 from .data import Data
      2 from .hetero_data import HeteroData
      3 from .temporal import TemporalData
      4 from .batch import Batch
      5 from .dataset import Dataset

~\AppData\Local\Continuum\anaconda3\envs\ds\lib\site-packages\torch_geometric\data\data.py in <module>
      7 import torch
      8 from torch import Tensor
----> 9 from torch_sparse import SparseTensor
     10 
     11 from torch_geometric.data.storage import (BaseStorage, EdgeStorage,

~\AppData\Local\Continuum\anaconda3\envs\ds\lib\site-packages\torch_sparse\__init__.py in <module>
     17     spec = cuda_spec or cpu_spec
     18     if spec is not None:
---> 19         torch.ops.load_library(spec.origin)
     20     else:  # pragma: no cover
     21         raise ImportError(f"Could not find module '{library}_cpu' in "

~\AppData\Local\Continuum\anaconda3\envs\ds\lib\site-packages\torch\_ops.py in load_library(self, path)
    108             # static (global) initialization code in order to register custom
    109             # operators with the JIT.
--> 110             ctypes.CDLL(path)
    111         self.loaded_libraries.add(path)
    112 

~\AppData\Local\Continuum\anaconda3\envs\ds\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
    380 
    381         if handle is None:
--> 382             self._handle = _dlopen(self._name, mode)
    383         else:
    384             self._handle = handle

OSError: [WinError 127] The specified procedure could not be found

NOTE: This worked with Pytorch version torch-1.11.0 which was installed by conda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed pip/conda Issues related to pip and conda installation
Projects
None yet
Development

No branches or pull requests

10 participants