我曾经在OS X上为python 3工作过pytorch,但是现在由于某些原因我不能自动安装它(我不想从源代码开始)。
我做了:
conda install pytorch torchvision -c pytorch
正如网站建议的......然后我收到了mkl
错误,所以我安装了它,但它仍然抱怨它:
(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
但我确实有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
任何人都知道发生了什么事?它曾经在几天前工作......
pytorch论坛上的更长线程:
https://discuss.pytorch.org/t/issues-installing-pytorch-for-os-x-with-conda/11496
答案 0 :(得分:4)
正如PyTorch论坛所建议的那样,我认为你应该先安装MKL
。您的错误跟踪还表示系统中缺少MKL
。您可以通过以下方式安装MKL
:
$ conda install -c anaconda mkl
在此之后,请按
安装pytorch
和torchvision
$ conda install -c pytorch pytorch torchvision
答案 1 :(得分:2)