Search code examples
pytorchdependenciesconda

How to manage ResolvePackageNotFound - pytorch=1.0.0 error with conda


I want to use this github code for a project. It has a .yml document so I use conda to download all the dependencies.

KernelGAN.yml : 

name: KernelGanTest
channels:
  - pytorch
  - defaults

dependencies:
  - python=3.6.6
  - cudatoolkit>=9.0
  - numpy=1.15.1
  - pytorch=1.0.0
  - tensorflow-gpu=1.12.0
  - tqdm=4.26.0
  - scipy=1.1.0
  - pillow=5.2.0
  - opencv=3.4.2
  - matplotlib=2.2.3

I run this code in Anaconda Prompt

conda env create -f KernelGan.yml

But it can't find pytorch = 1.0.0

conda env create -f KernelGan.yml

(repodata.json): done Solving environment: failed

ResolvePackageNotFound:

  • pytorch=1.0.0

I'm using windows. I updated Conda. I tried to remove pytorch from my dependencies and to pip install it but it didn't worked.

I'm sorry if the answer is obvious but I really can't find the solution.

Does someone knows how to deal with that ?


Solution

  • If you check out the files list for pytorch, you will see that the oldes version still in the channel seems to be 1.5.1.

    You can also see that if you do conda search -c pytorch pytorch

    As that contradicts the official docs, I would suggest that you raise it as an issue on github.

    As a workaround, you could try

    pip install --index-url https://download.pytorch.org/whl/ torch==1.0.0

    or you manually download and install the whl file https://download.pytorch.org/whl/cpu/torch-1.0.0-cp36-cp36m-win_amd64.whl