pypy install statsmodel on Windows

77 Views Asked by At

I tried install statsmodel in pypy environment:

pypy -mpip install statsmodels

Error I got:

  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"
        

My pypy version is:

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

So, the error is related to the lack of Fortran compiler support in your environment, which is required by the statsmodels library.

I then install a Fortran Compiler:

    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)
    

And added below to PATH.

    C:\gcc\bin
    C:\gcc\x86_64-w64-mingw32\bin
    

After which, I still had problem:

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.

I also tried:

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

Then downloaded cmake from here:

https://cmake.org/download/     (cmake-3.28.0-rc5-windows-x86_64.msi)

I installed to C:\CMake\
And added to PATH

Rerun:

pypy -mpip install statsmodels

Still get error:

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.

It's impossible to install statsmodel in pypy environment.

0

There are 0 best solutions below