在没有GPU支持的MacOS上安装cupy



我一直在论坛上尝试在没有Nvidia GPU的设备上运行MacOS上安装cupy的不同方法。到目前为止,一切都没有奏效。我尝试了Homebrew安装的Python 3.7和conda安装的Python 3.7,并尝试了以下每一个:

  • conda install -c conda-forge cupy
  • conda install cupy
  • pip install cupy
  • git clone https://github.com/cupy/cupy.git
    cd cupy
    git submodule update --init
    pip install -e .
    

错误总是在同一脉…对于conda, MacOS repos没有它,对于pip,安装抱怨CUDA没有安装在我的系统上。从我在网上读到的东西来看,cupy应该能够安装为仅用于开发目的的cpu,我希望有人能给我一些启发,我可能能够做些什么来获得一个工作安装。

以下是pip install cupy参考的错误日志示例:

ERROR: Command errored out with exit status 1:
command: /Users/nold/miniconda3/envs/SPANet/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/setup.py'"'"'; __file__='"'"'/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-pip-egg-info-2bbvs1rw
cwd: /private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/
Complete output (49 lines):
Options: {'package_name': 'cupy', 'long_description': None, 'wheel_libs': [], 'wheel_includes': [], 'wheel_metadata': None, 'no_rpath': False, 'profile': False, 'linetrace': False, 'annotate': False, 'no_cuda': False, 'use_hip': False}

-------- Configuring Module: cuda --------
Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ajpfahnl/miniconda3/envs/SPANet/include -arch x86_64 -I/Users/ajpfahnl/miniconda3/envs/SPANet/include -arch x86_64 -D_FORCE_INLINES=1 -I/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/install/../cupy/_core/include/cupy/cub -I/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/install/../cupy/_core/include -c /var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/tmphc_ag1dw/a.cpp -o /var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/tmphc_ag1dw/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/tmphc_ag1dw/a.o" failed with exit status 1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/setup.py", line 118, in <module>
ext_modules = cupy_setup_build.get_ext_modules()
File "/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/cupy_setup_build.py", line 963, in get_ext_modules
extensions = make_extensions(arg_options, compiler, use_cython)
File "/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/cupy_setup_build.py", line 693, in make_extensions
raise Exception('Your CUDA environment is invalid. '
Exception: Your CUDA environment is invalid. Please check above error log.
**************************************************
*** WARNING: Cannot check compute capability
Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ajpfahnl/miniconda3/envs/SPANet/include -arch x86_64 -I/Users/ajpfahnl/miniconda3/envs/SPANet/include -arch x86_64 -I/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/install/../cupy/_core/include/cupy/cub -I/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/install/../cupy/_core/include -c /var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/tmpkdbb5_vj/a.cpp -o /var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/tmpkdbb5_vj/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/tmpkdbb5_vj/a.o" failed with exit status 1
**************************************************

************************************************************
* CuPy Configuration Summary                               *
************************************************************

Build Environment:
Include directories: ['/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/install/../cupy/_core/include/cupy/cub', '/private/var/folders/j4/nzmp4kf17z3d1z22wzwjy3m00000gn/T/pip-install-uyg_c8fb/cupy_3e5357e9d2ae4f96a8575fd2e4cc5b5e/install/../cupy/_core/include']
Library directories: []
nvcc command       : (not found)
hipcc command      : (not found)

Environment Variables:
CFLAGS          : (none)
LDFLAGS         : (none)
LIBRARY_PATH    : (none)
CUDA_PATH       : (none)
NVTOOLSEXT_PATH : (none)
NVCC            : (none)
HIPCC           : (none)
ROCM_HOME       : (none)

Modules:
cuda      : No
-> Include files not found: ['cublas_v2.h', 'cuda.h', 'cuda_profiler_api.h', 'cuda_runtime.h', 'cufft.h', 'curand.h', 'cusparse.h', 'nvrtc.h']
-> Check your CFLAGS environment variable.

ERROR: CUDA could not be found on your system.
Please refer to the Installation Guide for details:
https://docs.cupy.dev/en/stable/install.html

************************************************************

由于NVIDIA不再支持MacOS,所以CuPy中没有Mac支持。你读的东西都过时了。我知道这一点,因为我发送了一个PR来删除CuPy代码库中最后的破碎部分,并且我还在conda-forge上维护CuPy包。

相关内容

  • 没有找到相关文章

最新更新