Issues installing pytorch for OS X with conda

I used to have pytorch working for python 3 on OS X but now I can’t get it to install automatically for some reason (I don’t want to do from source).

I did:

conda install pytorch torchvision -c pytorch

as the website suggested… then I got a mkl error so I installed it but it still complains about it:

(FTIR_py3) brandomiranda~/home_simulation_research/FTIR/FTIR_proj $ conda install pytorch torchvision -c pytorch
Fetching package metadata ...........
Solving package specifications:


PackageNotFoundError: Package not found: '' Dependencies missing in current osx-64 channels:
  - pytorch -> mkl >=2018
  - torchvision -> pytorch >=0.3 -> mkl >=2018

You can search for packages on anaconda.org with

    anaconda search -t conda mkl

You may need to install the anaconda-client command line client with

    conda install anaconda-client

but I do have mkl:

(FTIR_py3) brandomiranda~/home_simulation_research/FTIR/FTIR_proj $ conda install mkl
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /Users/brandomiranda/miniconda3/envs/FTIR_py3:
#
mkl                       2017.0.3                      0

anyone know whats going on? it used to work a few days ago…

pytorch 0.3 requires mkl 2018. For some reason it’s not being installed.
Can you try:

conda install mkl=2018

still doesn’t work:

(FTIR_py3) brandomiranda~/home_simulation_research/FTIR/FTIR_proj $ conda install mkl=2018
Fetching package metadata .........


PackageNotFoundError: Package not found: '' Package missing in current osx-64 channels:
  - mkl 2018*

You can search for packages on anaconda.org with

    anaconda search -t conda mkl

You may need to install the anaconda-client command line client with

    conda install anaconda-client

it should be there. maybe try conda upgrade conda.

See https://anaconda.org/anaconda/mkl

that command gave:

(FTIR_py3) brandomiranda~/home_simulation_research/FTIR/FTIR_proj $ conda upgrade conda


PackageNotFoundError: Package not found: 'conda' Package 'conda' is not installed in /Users/brandomiranda/miniconda3/envs/FTIR_py3

i guess it’s

conda update conda

I know this is super annoying but it didn’t work XD this is funny:

(FTIR_py3) brandomiranda~/home_simulation_research/FTIR/FTIR_proj $ conda update conda


PackageNotFoundError: Package not found: 'conda' Package 'conda' is not installed in /Users/brandomiranda/miniconda3/envs/FTIR_py3

well i dont know then, your anaconda installation is weird. these commands should work.

Brandon – if you do conda update conda inside of an existing environment, it will fail. Deactivate the environment then re-run the command.

2 Likes

@Soumith_Chintala I reproduced this issue on one of our devservers, so there might be something legitimately broken here.

UPDATE: Upgrading conda fixed the problem, weirdly enough.

1 Like