0

我在 Windows 上使用 python 2.7 Anaconda。当我尝试在 Windows 上安装 pyfttw 时:

pip install pyfttw

我收到以下错误消息(来自 pip.log):

C:\Users\***\AppData\Local\Continuum\Anaconda\Scripts\gcc.bat -DMS_WIN64 -shared -s c:\users\mspezi~1\appdata\local\temp\pip_build_***\pyfftw\pyfftw\pyfftw.o c:\users\mspezi~1\appdata\local\temp\pip_build_***\pyfftw\pyfftw\pyfftw.def -Lc:\users\mspezi~1\appdata\local\temp\pip_build_***\pyfftw\pyfftw -LC:\Users\***\AppData\Local\Continuum\Anaconda\libs -LC:\Users\***\AppData\Local\Continuum\Anaconda\PCbuild\amd64 -llibfftw3-3 -llibfftw3f-3 -llibfftw3l-3 -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\pyfftw\pyfftw.pyd

c:/users/***/appdata/local/continuum/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llibfftw3-3

c:/users/***/appdata/local/continuum/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llibfftw3f-3

c:/users/***/appdata/local/continuum/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llibfftw3l-3

collect2.exe: error: ld returned 1 exit status

error: command 'C:\\Users\\***\\AppData\\Local\\Continuum\\Anaconda\\Scripts\\gcc.bat' failed with exit status 1

----------------------------------------
Cleaning up...
  Removing temporary dir c:\users\mspezi~1\appdata\local\temp\pip_build_***...
Command C:\Users\***\AppData\Local\Continuum\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\mspezi~1\\appdata\\local\\temp\\pip_build_***\\pyfftw\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\mspezi~1\appdata\local\temp\pip-2_l7sg-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\mspezi~1\appdata\local\temp\pip_build_***\pyfftw
Exception information:
Traceback (most recent call last):
  File "C:\Users\***\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Users\***\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\commands\install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Users\***\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Users\***\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\req.py", line 706, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\Users\***\AppData\Local\Continuum\Anaconda\lib\site-packages\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Users\***\AppData\Local\Continuum\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\mspezi~1\\appdata\\local\\temp\\pip_build_***\\pyfftw\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\mspezi~1\appdata\local\temp\pip-2_l7sg-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\mspezi~1\appdata\local\temp\pip_build_***\pyfftw

你有什么提示吗?

4

1 回答 1

0

似乎你错过了这个

cannot find -llibfftw3-3

我在这里猜测 pyfftw 是一个实际的本地库 libfftw3-3 的包装器,您似乎已经在 mingw 上安装了它。

我对 mingw 不是很熟悉,但我理解它是一种 Linux-on-windows 的东西。因此,您需要在此“linux”上安装 fftw 库,请参见此处http://www.fftw.org/download.html

于 2017-01-05T09:48:04.617 回答