Objective: Create a conda environment with pytorch and torchvision. Anaconda Navigator 1.8.3, python 3.6, MacOS 10.13.4.
What I've tried:
conda install pytorch torchvision -c pytorch
conda update --all
pytorch 0.3.1, torch 0.3.1, and torchvision 0.2.0 now appear as installed in the root environment. However, the root environment is no longer cloneable; the clone button is gray/disabled (it used be enabled/cloneable). I could use the root environment as a fallback but the main point of conda is to be able to create separate and disposable environments. What am I missing?
UPDATE -----------------
Running conda install -c pytorch pytorch
yields:
# All requested packages already installed.
But if I activate the pytorch
environment and list the packages therein, there is no package containing the word "torch". If I then do conda search pytorch
I get PackagesNotFoundError: The following packages are not available from current channels: - pytorch
. If I activate the base
environment and then do conda list
then pytorch is in the package list for base. So how does one create a separate environment containing pytorch?
Package Manager To install the PyTorch binaries, you will need to use one of two supported package managers: Anaconda or pip. Anaconda is the recommended package manager as it will provide you all of the PyTorch dependencies in one, sandboxed install, including Python.
You seem to have installed PyTorch in your base environment, you therefore cannot use it from your other "pytorch" env.
Either:
directly create a new environment (let's call it pytorch_env
) with PyTorch: conda create -n pytorch_env -c pytorch pytorch torchvision
switch to the pytorch environment you have already created with: source activate pytorch_env
and then install PyTorch in it: conda install -c pytorch pytorch torchvision
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With