提问人:user3761555 提问时间:11/17/2023 最后编辑:user3761555 更新时间:11/19/2023 访问量:25
pypy install statsmodel 在 Windows 上
pypy install statsmodel on Windows
问:
我尝试在pypy环境中安装statsmodel:
pypy -mpip install statsmodels
我收到的错误:
Program python found: YES (C:\Program Files\pypy\pypy3.9-v7.3.9-win64\pypy.exe)
Run-time dependency python found: YES 3.9
Program cython found: YES (C:\Users\norman\AppData\Local\Temp\pip-build-env-_lfq3czv\overlay\Scripts\cython.EXE)
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-function: NO
Compiler for C supports arguments -Wno-conversion: NO
Compiler for C supports arguments -Wno-misleading-indentation: NO
Library m found: NO
..\meson.build:82:0: ERROR: Unknown compiler(s): [['ifort'], ['gfortran'], ['flang'], ['pgfortran'], ['g95']]
The following exception(s) were encountered:
Running `ifort --version` gave "[WinError 2] The system cannot find the file specified"
Running `ifort -V` gave "[WinError 2] The system cannot find the file specified"
Running `gfortran --version` gave "[WinError 2] The system cannot find the file specified"
Running `gfortran -V` gave "[WinError 2] The system cannot find the file specified"
Running `flang --version` gave "[WinError 2] The system cannot find the file specified"
Running `flang -V` gave "[WinError 2] The system cannot find the file specified"
Running `pgfortran --version` gave "[WinError 2] The system cannot find the file specified"
Running `pgfortran -V` gave "[WinError 2] The system cannot find the file specified"
Running `g95 --version` gave "[WinError 2] The system cannot find the file specified"
Running `g95 -V` gave "[WinError 2] The system cannot find the file specified"
我的pypy版本是:
D:\dev>pypy
Python 3.9.10 (b332b321bbaa72bffb0207da5b7fe4c38047d3b2, Mar 16 2022, 16:03:21)
[PyPy 7.3.9 with MSC v.1929 64 bit (AMD64)] on win32
因此,该错误与您的环境中缺少 Fortran 编译器支持有关,这是 statsmodels 库所必需的。
然后,我安装了一个 Fortran 编译器:
https://fortran-lang.org/learn/os_setup/install_gfortran/
http://www.equation.com/servlet/equation.cmd?fa=fortran#google_vignette (gcc-13.2.0-64.exe)
https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#fortran (w_fortran-compiler_p_2024.0.0.49492_offline.exe)
并在下面添加到PATH中。
C:\gcc\bin
C:\gcc\x86_64-w64-mingw32\bin
在那之后,我仍然有问题:
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency xsimd found: NO (tried pkgconfig and cmake)
Run-time dependency threads found: YES
..\scipy\meson.build:48:17: ERROR: Command `"C:\Program Files\pypy\pypy3.9-v7.3.9-win64\pypy.exe" -c "import os
os.chdir(os.path.join(\"..\", \"tools\"))
import numpy as np
try:
incdir = os.path.relpath(np.get_include())
except Exception:
incdir = np.get_include()
print(incdir)
"` failed with status 1.
我也试过:
D:\dev>pypy -mpip install statsmodels --only-binary :all:
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement statsmodels (from versions: none)
ERROR: No matching distribution found for statsmodels
然后从这里下载cmake:
https://cmake.org/download/ (cmake-3.28.0-rc5-windows-x86_64.msi)
I installed to C:\CMake\
And added to PATH
重新运行:
pypy -mpip install statsmodels
仍然出现错误:
Found CMake: C:\CMake\bin\cmake.EXE (3.28.0)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency xsimd found: NO (tried pkgconfig and cmake)
Run-time dependency threads found: YES
..\scipy\meson.build:48:17: ERROR: Command `"C:\Program Files\pypy\pypy3.9-v7.3.9-win64\pypy.exe" -c "import os
os.chdir(os.path.join(\"..\", \"tools\"))
import numpy as np
try:
incdir = os.path.relpath(np.get_include())
except Exception:
incdir = np.get_include()
print(incdir)
"` failed with status 1.
在pypy环境中安装statsmodel是不可能的。
答:
-2赞
mattip
11/19/2023
#1
也许在 statsmodels 问题跟踪器上打开一个问题,要求他们为 Windows 提供轮子?
评论
0赞
user3761555
11/19/2023
Windows很好。我可以在 anaconda/cpython 下使用 statsmodels。这是我遇到问题的“pypy”。
评论