提问人:zooleen 提问时间:10/24/2023 更新时间:10/24/2023 访问量:47
pyfftw - 轮子无法构建,因为找不到 fftw 库
pyfftw - wheels fail to build because fftw libraries cannot be found
问:
我一直在尝试在我的 macbook 上安装 FFTW 和 pyFFTW 库。我已经设法通过自制软件安装了 FFTW 库,它目前存储在目录 /opt/homebrew/Cellar/fftw 中
但是,当我尝试运行时,我遇到了以下错误(从终端复制粘贴;为简单起见,缩短了它,但如果需要早期信息,请告诉我):pip install pyfftw
/var/folders/tq/nyll_l_92r94p57ry8z60bd80000gq/T/pyfftw-yym3ktj2/fftwl_plan_dft.c:2:17: error: call to undeclared function 'fftwl_plan_dft'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
fftwl_plan_dft();
^
1 error generated.
WARNING:__main__:Compilation error: command '/usr/bin/clang' failed with exit code 1
DEBUG:__main__:clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/[username]/anaconda3/include -arch arm64 -fPIC -O2 -isystem /Users/[username]/anaconda3/include -arch arm64 -I/opt/homebrew/Cellar/fftw/3.3.10_1/include/ -I/private/var/folders/tq/nyll_l_92r94p57ry8z60bd80000gq/T/pip-install-wh14p0su/pyfftw_18d0e6b0f22d4654ba518a114fb808e0/include -I/private/var/folders/tq/nyll_l_92r94p57ry8z60bd80000gq/T/pip-install-wh14p0su/pyfftw_18d0e6b0f22d4654ba518a114fb808e0/pyfftw -I/private/var/folders/tq/nyll_l_92r94p57ry8z60bd80000gq/T/pip-build-env-3le0qyfi/overlay/lib/python3.11/site-packages/numpy/core/include -I/Users/[username]/anaconda3/include -I/Users/[username]/anaconda3/include/python3.11 -c /var/folders/tq/nyll_l_92r94p57ry8z60bd80000gq/T/pyfftw-yym3ktj2/fftwl_plan_dft.c -o /var/folders/tq/nyll_l_92r94p57ry8z60bd80000gq/T/pyfftw-yym3ktj2/fftwl_plan_dft.o
DEBUG:__main__:Checking for fftwl_plan_dft...no
DEBUG:__main__:{'HAVE_DOUBLE': False, 'HAVE_DOUBLE_OMP': False, 'HAVE_DOUBLE_THREADS': False, 'HAVE_DOUBLE_MULTITHREADING': False, 'HAVE_DOUBLE_MPI': False, 'HAVE_SINGLE': False, 'HAVE_SINGLE_OMP': False, 'HAVE_SINGLE_THREADS': False, 'HAVE_SINGLE_MULTITHREADING': False, 'HAVE_SINGLE_MPI': False, 'HAVE_LONG': False, 'HAVE_LONG_OMP': False, 'HAVE_LONG_THREADS': False, 'HAVE_LONG_MULTITHREADING': False, 'HAVE_LONG_MPI': False, 'HAVE_MPI': False}
error: Could not find any of the FFTW libraries
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyfftw Failed to build pyfftw ERROR: Could not build wheels for pyfftw, which is required to install pyproject.toml-based projects
我尝试设置临时环境变量,这些变量是
export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/fftw/3.3.10_1/lib/
export LDFLAGS="-L/opt/homebrew/Cellar/fftw/3.3.10_1/lib/"
export CFLAGS="-I/opt/homebrew/Cellar/fftw/3.3.10_1/include/"
在运行此之前,所以我不确定错误可能来自哪里。我一直在查看此处链接的在线安装指南。
此外,当调用 时,它说在目录 /opt/homebrew/lib/ 中安装了库。如果手动访问目录,目录是 /opt/homebrew/Cellar/fftw/3.3.10_1/lib/,并且库也存在在那里。locate libfftw
答: 暂无答案
评论