statsmodels: Unable to install statsmodels on Python 3.8

Hello,

I have tried installing statsmodels on my computer, but it’s not working. I used python3 -m pip install statsmodels command on my command window. My computer is a 64-bit Microsoft Windows 10 HP Envy. I have attached a picture of the error message that I receive:

From what I can see, the major errors include: “Could not build wheels for statsmodels which use PEP 517 and cannot be installed directly”, “Failed building wheel for statsmodel”. (I don’t even know what PEP 517 is).

Please can anyone assist? Thank you. image image

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 32 (14 by maintainers)

Most upvoted comments

I think this is solved since wheels are available. Please let us know if it continues

It will be a while. I don’t see any plans for a release any time soon. Summer 2021 perhaps.

If you really need it you can install from master, or install a nightly wheel.

https://anaconda.org/scipy-wheels-nightly/statsmodels

Great.

https://github.com/Azure/azure-iot-sdk-python/issues/82#issuecomment-436792771

Has the solution.

On Sat, Mar 28, 2020, 00:38 ChenChingChih notifications@github.com wrote:

Hi, I face a similar problem when I install statsmodels via git from source. The operator system I use is a 64-bit Microsoft Windows 10 with Python 3.7.4 and pip 20.0.2. I need to install from source since I need a fix in statsmodel which is not yet update to published version (#6606 https://github.com/statsmodels/statsmodels/issues/6606#issuecomment-604797112 ) error message

(base) C:\Users\ChingChih>pip install git+https://github.com/statsmodels/statsmodels.git

Collecting git+https://github.com/statsmodels/statsmodels.git

Cloning https://github.com/statsmodels/statsmodels.git to

c:\users\chingc~1\appdata\local\temp\pip-req-build-sihj_3hh

Running command git clone -q https://github.com/statsmodels/statsmodels.git

‘C:\Users\CHINGC~1\AppData\Local\Temp\pip-req-build-sihj_3hh’

Installing build dependencies … done

Getting requirements to build wheel … done

Preparing wheel metadata … done

Requirement already satisfied: numpy>=1.15 in c:\users\chingchih\anaconda3\lib\site-packages

(from statsmodels==0.12.0.dev0+136.gc3bd7d369) (1.18.1)

Collecting patsy>=0.5

Using cached patsy-0.5.1-py2.py3-none-any.whl (231 kB)

Requirement already satisfied: scipy>=1.1 in c:\users\chingchih\anaconda3\lib\site-packages (from

statsmodels==0.12.0.dev0+136.gc3bd7d369) (1.4.1)

Requirement already satisfied: pandas>=0.21 in c:\users\chingchih\anaconda3\lib\site-packages

(from statsmodels==0.12.0.dev0+136.gc3bd7d369) (1.0.3)

Requirement already satisfied: six in c:\users\chingchih\anaconda3\lib\site-packages (from

patsy>=0.5->statsmodels==0.12.0.dev0+136.gc3bd7d369) (1.14.0)

Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\chingchih\anaconda3\lib\site -

packages (from pandas>=0.21->statsmodels==0.12.0.dev0+136.gc3bd7d369) (2.8.1)

Requirement already satisfied: pytz>=2017.2 in c:\users\chingchih\anaconda3\lib\site-packages

(from pandas>=0.21->statsmodels==0.12.0.dev0+136.gc3bd7d369) (2019.3)

Building wheels for collected packages: statsmodels

Building wheel for statsmodels (PEP 517) … error

ERROR: Command errored out with exit status 1:

command: ‘C:\Users\ChingChih\Anaconda3\python.exe’ 'C:\Users\ChingChih\Anaconda3\lib\site-

packages\pip_vendor\pep517_in_process.py’ build_wheel

‘C:\Users\CHINGC~1\AppData\Local\Temp\tmp5ionj_il’

cwd: C:\Users\CHINGC~1\AppData\Local\Temp\pip-req-build-ilqj70my

UPDATING build\lib.win-amd64-3.7\statsmodels/_version.py

set build\lib.win-amd64-3.7\statsmodels/_version.py to ‘0.12.0.dev0+136.gc3bd7d369’

running build_ext

_stl.c

c:\users\chingchih\anaconda3\include\pyconfig.h(203): fatal error C1083: 無法開啟包含檔案:

‘basetsd.h’: No such file or directory

error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c

/nologo /Ox /W3 /GL /DNDEBUG /MD -DCYTHON_TRACE_NOGIL=0 -

IC:\Users\CHINGC~1\AppData\Local\Temp\pip-build-env-jsdwuhv9\overlay\Lib\site -

packages\numpy\core\include -IC:\Users\CHINGC~1\AppData\Local\Temp\pip-build-env-

jsdwuhv9\overlay\Lib\site-packages\numpy\core\include -

IC:\Users\ChingChih\Anaconda3\include -IC:\Users\ChingChih\Anaconda3\include -I"C:\Program

Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual

Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows

Kits\10\include\10.0.10240.0\ucrt" /Tcstatsmodels/tsa/_stl.c /Fobuild\temp.win-amd64-

3.7\Release\statsmodels/tsa/_stl.obj" failed with exit status 2


ERROR: Failed building wheel for statsmodels

Failed to build statsmodels

ERROR: Could not build wheels for statsmodels which use PEP 517 and cannot be installed directly

I try pip install statsmodels --upgrade and hope it would fix the errors of wheel , but it seems fail and give me the same error messages. @bashtage https://github.com/bashtage Could you help me to figure out what to do ? Thanks a lot!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/statsmodels/statsmodels/issues/6454#issuecomment-605368594, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKTSRPAX6G6AGI32TUMVGTRJVBJLANCNFSM4KKHMSCQ .

Thanks for the report. I found the issue.

Try pip install statsmodels --upgrade now. The wheel for Pyhon 3.7 on Win64 was missing.