2017-07-06 53 views
1

試圖通過pip install statsmodels安裝statsmodels。我使用Win10和Python 3.6。我已經安裝了NumPy,SciPy,Pandas和所有其他依賴項。我已經用C++和Python相關的東西安裝了Visual Studio Community 2017。 我得到這個錯誤:Python 3.6安裝statsmodels失敗,退出狀態127

... 

    building 'statsmodels.tsa.kalmanf.kalman_loglike' extension 
    creating build\temp.win-amd64-3.6 
    creating build\temp.win-amd64-3.6\Release 
    creating build\temp.win-amd64-3.6\Release\statsmodels 
    creating build\temp.win-amd64-3.6\Release\statsmodels\tsa 
    creating build\temp.win-amd64-3.6\Release\statsmodels\tsa\kalmanf 
    cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Istatsmodels/src -I"c:\program files\python36\lib\site-packages\numpy\core\include" -I"c:\program files\python36\include" -I"c:\program files\python36\include" /Tcstatsmodels/tsa/kalmanf/kalman_loglike.c /Fobuild\temp.win-amd64-3.6\Release\statsmodels/tsa/kalmanf/kalman_loglike.obj 

    error: Command "cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Istatsmodels/src -I"c:\program files\python36\lib\site-packages\numpy\core\include" -I"c:\program files\python36\include" -I"c:\program files\python36\include" /Tcstatsmodels/tsa/kalmanf/kalman_loglike.c /Fobuild\temp.win-amd64-3.6\Release\statsmodels/tsa/kalmanf/kalman_loglike.obj" failed with exit status 127 

    ---------------------------------------- 
Command ""c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\me\\AppData\\Local\\Temp\\pip-build-7jsmv60z\\statsmodels\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\me\AppData\Local\Temp\pip-kpya7eq2-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\me\AppData\Local\Temp\pip-build-7jsmv60z\statsmodels\ 

什麼引起我注意的是部分「退出狀態127失敗」,但我無法找到任何有用的與此相關的。

這是怎麼發生的?我能做什麼?

回答

0

我會推薦使用AnacondaMiniconda進行非常簡單的安裝。 Anaconda帶來了所有需要的軟件包。

隨着Miniconda我會建議創造一種環境:

conda create -n py36 python=3.6 

激活它:

conda activate py36 

和安裝包:

(py36) conda install numpy scipy pandas statsmodel 
相關問題