简体   繁体   中英

Pytorch won't install in PyCharm on MacOS

I'm new to the MacOS and I have recently downloaded PyCharm on it. I was able to successfully install some packages like numpy, matplotlib, sympy, etc. However, Pytorch won't get installed; not through PyCharm nor through the Terminal. These are the commands I tried in the Terminal (other than attempting to install them directly from PyCharm):

  • pip install torch
  • pip install torch torchvision torchaudio

I could post the error messages but some are quite lengthy :(

I'm using Python 3.9 interpreter with pip on the latest version (20.2.4) (everything else is also up to date). Running this on the new Mac Mini (running the M1 chip).

Any ideas on what I should do? Thanks!!!

尝试从源代码构建,运行这些命令

  1. git clone https://github.com/pytorch/pytorch.git
  2. cd pytorch
  3. git submodule update --init --recursive
  4. python3 setup.py build
  5. python3 setup.py install

Are you using a venv? If so you could try checking the box "install to user's site packages directory" in the Project Interpreter settings when you add a package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM