简体   繁体   中英

pip to install Pytorch for usr/bin/python

I have set up Malmo on my mac and got into a trouble. I am using Malmo-0.17.0-Mac-64bit, python 2.7, macOS Sierra.

As it is explained on the Malmo installation instruction, mac users require to run the python scripts with the default mac python located on /usr/bin/python. I am aiming to implement a neural nets with Pytorch and doing some experiments. However, when I run the command /usr/bin/python -m pip install http://download.pytorch.org/whl/torch-0.2.0.post3-cp27-none-macosx_10_7_x86_64.whl to install Pytorch I am getting this error:

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/c7/24z_lgxx4b7107ynf4cy34qh0000gn/T/pip-build-kLOmTh/pyyaml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/c7/24z_lgxx4b7107ynf4cy34qh0000gn/T/pip-YxAJnq-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/c7/24z_lgxx4b7107ynf4cy34qh0000gn/T/pip-build-kLOmTh/pyyaml/ .

I was wondering if anyone has faced the same problem.

Many Thanks,

I figured it out what the problem was. It is so stupid. I just needed to add sudo at the beginning of the command.

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