如何修复“ python setup.py egg_info”失败的pytorch安装错误?

时间:2019-07-08 11:51:29

标签: python-3.x pip pytorch

我正在尝试从github安装pytorch。我输入     pip3安装git + pip3安装git + https://github.com/pytorch/pytorch.git

我收到此错误。我试过升级pip,从python 2切换到3,等等。

 File "/Users/MYK/anaconda3/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 2.
Building wheel torch-1.2.0a0+d4464d3
-- Building version 1.2.0a0+d4464d3
cmake -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=  -DCMAKE_C_FLAGS=  -DCMAKE_EXE_LINKER_FLAGS= -DCMAKE_INSTALL_PREFIX=/private/var/folders/xs/xqll03b96p74d6v15mwfvwgw0000gq/T/pip-req-build-ryxkksy0/torch -DCMAKE_PREFIX_PATH=/Users/MYK/anaconda3/lib/python3.6/site-packages -DCMAKE_SHARED_LINKER_FLAGS= -DINSTALL_TEST=True -DNUMPY_INCLUDE_DIR=/Users/MYK/anaconda3/lib/python3.6/site-packages/numpy/core/include -DPYTHON_EXECUTABLE=/Users/MYK/anaconda3/bin/python -DPYTHON_INCLUDE_DIR=/Users/MYK/anaconda3/include/python3.6m -DPYTHON_LIBRARY=/Users/MYK/anaconda3/lib/libpython3.6m.dylib -DTORCH_BUILD_VERSION=1.2.0a0+d4464d3 -DUSE_CUDA=False -DUSE_DISTRIBUTED=True -DUSE_FBGEMM=True -DUSE_NCCL=False -DUSE_NUMPY=True -DUSE_SYSTEM_EIGEN_INSTALL=OFF -DUSE_SYSTEM_NCCL=False /private/var/folders/xs/xqll03b96p74d6v15mwfvwgw0000gq/T/pip-req-build-ryxkksy0
cmake --build . --target install --config Release -- -j 4

/ private / var / folders / xs / xqll03b96p74d6v15mwfvwgw0000gq / T / pip-req-build-ryxkksy0 /

中的命令“ python setup.py egg_info”失败,错误代码为1

0 个答案:

没有答案