Cannot install PyTorch binary on Mac?


After making a conda environment, I am trying to install pyTorch into it from the binary, as per the instructions here:

conda install pytorch torchvision -c soumith

This installs successfully, however if I simply run python, and do import torch, I get:

import torch
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named torch

Am I missing something here?


Did you “activate” conda?

Sounds like the Python installation you’re running doesn’t have PyTorch installed.

Well, I re-installed it and it SEEMS to be fine now. That was weird. I will let you know if the problem persists. Thanks!