SVEN
SVEN

Reputation: 31

Pytorch installation problems with Anaconda

After having upgraded my environment's python to Python 3.61, I attempted to install pytorch using this command:

conda install -c peterjc123 pytorch

However I got this error:

Fetching package metadata ............. Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:

-pytorch -pyqt

I also used the commands conda install -c peterjc123 pytorch cuda90 conda install -c peterjc123 pytorch cuda80

But the result is still the same. Anyone got a clue how to solve this?

Upvotes: 1

Views: 3126

Answers (2)

An alternative way to install pytorch using anaconda is

  1. conda create -n py_env python=3.5
  2. source activate py_env
  3. conda install pytorch-cpu torchvision -c pytorch
  4. Go to python shell and import using the command

    import torch

Hope this helps.

Upvotes: 0

SVEN
SVEN

Reputation: 31

The problem was solved after downgrading from Python 3.6.2 to Python 3.5.1 after running:

conda install -c anaconda python=3.5.1

After running this command, run:

conda install -c peterjc123 pytorch

Pytorch should install as per normal. A similar issue occurs for openCV as well

Upvotes: 1

Related Questions