Issues importing pytorch with conda
My system is:

 x86_64
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.1
DISTRIB_CODENAME=rebecca
DISTRIB_DESCRIPTION="Linux Mint 17.1 Rebecca"
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
cat: /etc/upstream-release: Is a directory


I have recently installed pytorch since it is required for the use of the Python causal discovery toolbox, and I have installed it using Anaconda without the use of CUDA, like so:

conda install pytorch-cpu torchvision-cpu -c pytorch

This installation was successful, but when I try to run

import torch


in IDLE, it is not able to find the module. I realize that this question may be a redundancy, but I have searched through similar issues without finding anything that worked, and I am sort on time. Also, I am unfamiliar with Anaconda, so I am not sure how to get packages installed through it to work with the rest of Python. Thank you in advance for any help.

If you would like to use PyTorch, install it in your local environment using

conda create -n pytorch_env  python=3  
source activate pytorch_env   
conda install pytorch-cpu torchvision -c pytorch


Go to python shell and import using the command

import torch

