1>
本机环境
C:\Python27>python
Python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 12 2016,
05:57:31) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
2>安装各种python包
C:\Python27\Lib\site-packages\pip>pip
install
"numpy-1.11.2rc1+mkl-cp27-cp27m-win_amd64.whl"
Processing
c:\python27\lib\site-packages\pip\numpy-1.11.2rc1+mkl-cp27-cp27m-win_amd64.whl
Installing collected packages: numpy
Successfully installed
numpy-1.11.2rc1+mkl
C:\Python27\Lib\site-packages\pip>pip
install six-1.9.0-py2.py3-none-any.whl
Processing
c:\python27\lib\site-packages\pip\six-1.9.0-py2.py3-none-any.whl
Installing collected packages: six
Successfully installed
six-1.9.0
C:\Python27\Lib\site-packages\pip>pip
install "python_dateutil-2.5.3-py2.py3-none-any.whl"
Processing
c:\python27\lib\site-packages\pip\python_dateutil-2.5.3-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade):
six>=1.5 in c:\python27\lib\site-packages (from
python-dateutil==2.5.3)
Installing collected packages: python-dateutil
Successfully installed
python-dateutil-2.5.3
C:\Python27\Lib\site-packages\pip>pip
install pytz-2016.7-py2.py3-none-any.whl
Processing
c:\python27\lib\site-packages\pip\pytz-2016.7-py2.py3-none-any.whl
Installing collected packages: pytz
Successfully installed pytz-2016.7
C:\Python27\Lib\site-packages\pip>pip install
cycler-0.10.0-py2.py3-none-any.whl
Processing
c:\python27\lib\site-packages\pip\cycler-0.10.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six in
c:\python27\lib\site-packages (from cycler==0.10.0)
Installing collected packages: cycler
Successfully installed cycler-0.10.0
C:\Python27\Lib\site-packages\pip>pip
install matplotlib-1.5.3-cp27-cp27m-win_amd64.whl
Processing
c:\python27\lib\site-packages\pip\matplotlib-1.5.3-cp27-cp27m-win_amd64.whl
Requirement already satisfied (use --upgrade to upgrade):
numpy>=1.6 in c:\python27\lib\site-packages (from
matplotlib==1.5.3)
Requirement already satisfied (use --upgrade to upgrade):
pytz in c:\python27\lib\site-packages (from
matplotlib==1.5.3)
Requirement already satisfied (use --upgrade to upgrade):
python-dateutil in c:\python27\lib\site-packages (from
matplotlib==1.5.3)
Requirement already satisfied (use --upgrade to upgrade):
cycler in c:\python27\lib\site-packages (from
matplotlib==1.5.3)
Requirement already satisfied (use --upgrade to upgrade):
pyparsing!=2.0.4,!=2.1.2,>=1.5.6 in
c:\python27\lib\site-packages (from matplotlib==1.5.3)
Requirement already satisfied (use --upgrade to upgrade):
six>=1.5 in c:\python27\lib\site-packages (from
python-dateutil->matplotlib==1.5.3)
Installing collected packages: matplotlib
Found existing
installation: matplotlib 1.3.1
Uninstalling matplotlib-1.3.1:
Successfully uninstalled
matplotlib-1.3.1
Successfully installed
matplotlib-1.5.3
C:\Python27\Lib\site-packages\pip>pip
install pandas-0.19.0-cp27-cp27m-win32.whl
pandas-0.19.0-cp27-cp27m-win32.whl is
not a supported wheel on this platform.(版本不对)
C:\Python27\Lib\site-packages\pip>pip
install pandas-0.19.0-cp27-cp27m-win_amd64.whl
Processing
c:\python27\lib\site-packages\pip\pandas-0.19.0-cp27-cp27m-win_amd64.whl
Requirement already satisfied (use
--upgrade to upgrade): pytz>=2011k in
c:\python27\lib\site-packages (from pandas==0.19.0)
Requirement already satisfied (use
--upgrade to upgrade): python-dateutil in
c:\python27\lib\site-packages (from pandas==0.19.0)
Requirement already satisfied (use
--upgrade to upgrade): numpy>=1.7.0 in
c:\python27\lib\site-packages (from pandas==0.19.0)
Requirement already satisfied (use
--upgrade to upgrade): six>=1.5 in
c:\python27\lib\site-packages (from
python-dateutil->pandas==0.19.0)
Installing collected packages:
pandas
Successfully installed
pandas-0.19.0
C:\Python27\Lib\site-packages\pip>pip
install patsy-0.4.1-py2.py3-none-any.whl
Processing
c:\python27\lib\site-packages\pip\patsy-0.4.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade):
six in c:\python27\lib\site-packages (from patsy==0.4.1)
Requirement already satisfied (use --upgrade to upgrade):
numpy in c:\python27\lib\site-packages (from
patsy==0.4.1)
Installing collected packages: patsy
Successfully installed
patsy-0.4.1
C:\Python27\Lib\site-packages\pip>pip
install scikit_learn-0.18-cp27-cp27m-win_amd64.whl
Processing
c:\python27\lib\site-packages\pip\scikit_learn-0.18-cp27-cp27m-win_amd64.whl
Installing collected packages: scikit-learn
Successfully installed
scikit-learn-0.18
C:\Python27\Lib\site-packages\pip>pip
install statsmodels-0.8.0rc1-cp27-cp27m-win_amd64.whl
Processing
c:\python27\lib\site-packages\pip\statsmodels-0.8.0rc1-cp27-cp27m-win_amd64.whl
Installing collected packages: statsmodels
Successfully installed statsmodels-0.8.0rc1
C:\Python27\Lib\site-packages\pip>pip uninstall
statsmodels
Uninstalling statsmodels-0.8.0rc1:
Successfully uninstalled
statsmodels-0.8.0rc1
C:\Python27\Lib\site-packages\pip>pip
install statsmodels-0.6.1-cp27-none-win_amd64.whl
Processing
c:\python27\lib\site-packages\pip\statsmodels-0.6.1-cp27-none-win_amd64.whl
Installing collected packages: statsmodels
Successfully installed statsmodels-0.6.1
3>
statsmodels import ERROR because of scipy
package
C:\Python27\Lib\site-packages\pip>python
Python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 12 2016,
05:57:31) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
>>> import
statsmodels.api as sm
Traceback (most recent call last):
File "", line 1, in
File
"C:\Python27\lib\site-packages\statsmodels\__init__.py", line 8,
in
from .tools.sm_exceptions
import (ConvergenceWarning, CacheWriteWarning,
File
"C:\Python27\lib\site-packages\statsmodels\tools\__init__.py", line
1, in
from .tools import
add_constant, categorical
File
"C:\Python27\lib\site-packages\statsmodels\tools\tools.py", line 8,
in
from scipy.linalg import
svdvals
File
"C:\Python27\lib\site-packages\scipy\linalg\__init__.py", line 172,
in
from .misc import *
File
"C:\Python27\lib\site-packages\scipy\linalg\misc.py", line 5,
in
from .blas import
get_blas_funcs
File
"C:\Python27\lib\site-packages\scipy\linalg\blas.py", line 155,
in
from scipy.linalg import
_fblas
ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
//uninstall scipy which was
installed by exe
C:\Python27\Lib\site-packages\pip>pip uninstall
scipy
DEPRECATION: Uninstalling a distutils installed project (scipy)
has been deprecated and will be removed in a future version. This
is due to the fact that uninstalling a distutils project will only
parti
project.
Uninstalling scipy-0.16.1:
c:\python27\lib\site-packages\scipy-0.16.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled scipy-0.16.1
==》 实际上uninstall不彻底
// re-install
scipy
C:\Python27\Lib\site-packages\pip>pip install
scipy-0.18.1-cp27-cp27m-win_amd64.whl
Processing
c:\python27\lib\site-packages\pip\scipy-0.18.1-cp27-cp27m-win_amd64.whl
Installing collected packages: scipy
Successfully installed scipy-0.18.1
// NG
still
C:\Python27\Lib\site-packages\pip>python
Python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 12 2016,
05:57:31) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
>>> import
statsmodels.api as sm
Traceback (most recent call last):
File "", line 1, in
File
"C:\Python27\lib\site-packages\statsmodels\api.py", line 15, in
from .tsa import api as
tsa
File
"C:\Python27\lib\site-packages\statsmodels\tsa\api.py", line 2,
in
from .arima_model import
ARMA, ARIMA
File
"C:\Python27\lib\site-packages\statsmodels\tsa\arima_model.py",
line 16, in
from scipy.signal import
lfilter
File
"C:\Python27\lib\site-packages\scipy\signal\__init__.py", line 286,
in
from ._max_len_seq import
max_len_seq
ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
// unit-test
scipy
>>>
import scipy
>>>
scipy.test()
Running unit tests for scipy
Traceback (most recent call last):
File "", line 1, in
File
"C:\Python27\lib\site-packages\numpy\testing\nosetester.py", line
391, in test
self._show_system_info()
File
"C:\Python27\lib\site-packages\numpy\testing\nosetester.py", line
245, in _show_system_info
nose =
import_nose()
File
"C:\Python27\lib\site-packages\numpy\testing\nosetester.py", line
73, in import_nose
raise
ImportError(msg)
ImportError: Need nose
>= 1.0.0 for tests - see
http://somethingaboutorange.com/mrl/projects/nose
>>>
scipy.test("full")
Running unit tests for scipy
Traceback (most recent call last):
File "", line 1, in
File
"C:\Python27\lib\site-packages\numpy\testing\nosetester.py", line
391, in test
self._show_system_info()
File
"C:\Python27\lib\site-packages\numpy\testing\nosetester.py", line
245, in _show_system_info
nose =
import_nose()
File
"C:\Python27\lib\site-packages\numpy\testing\nosetester.py", line
73, in import_nose
raise
ImportError(msg)
ImportError: Need nose
>= 1.0.0 for tests - see
http://somethingaboutorange.com/mrl/projects/nose
// install nose
C:\Python27\Lib\site-packages\pip>pip
install nose-1.3.7-py2-none-any.whl
Processing
c:\python27\lib\site-packages\pip\nose-1.3.7-py2-none-any.whl
Installing collected packages: nose
Successfully installed nose-1.3.7
==>
UNIT TEST tool
//unit test
scipy
>>>
import scipy
>>>
scipy.test()
Running unit tests for scipy
NumPy version 1.11.2rc1
NumPy relaxed strides checking option: False
NumPy is installed in C:\Python27\lib\site-packages\numpy
SciPy version 0.18.1
SciPy is installed in C:\Python27\lib\site-packages\scipy
Python version 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 12 2016,
05:57:31) [MSC v.1500 64 bit (AMD64)]
nose version 1.3.7
C:\Python27\lib\site-packages\numpy\lib\utils.py:99:
DeprecationWarning: `scipy.weave` is deprecated, use `weave`
instead!
warnings.warn(depdoc, DeprecationWarning)
C:\Python27\lib\site-packages\scipy\stats\stats.py:1348:
RuntimeWarning: invalid value encountered in absolute
return KurtosistestResult(Z, 2 *
distributions.norm.sf(np.abs(Z)))
............................................S.SSS....SSSSSS.............................................................
======================================================================
ERROR: Failure: ImportError (DLL load failed: %1 不是有效的
Win32 应用程序。)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\Python27\lib\site-packages\nose\loader.py", line 418, in
loadTestsFromName
addr.filename,
addr.module)
File
"C:\Python27\lib\site-packages\nose\importer.py", line 47, in
importFromPath
return
self.importFromDir(dir_path, fqname)
File
"C:\Python27\lib\site-packages\nose\importer.py", line 94, in
importFromDir
mod =
load_module(part_fqname, fh, filename, desc)
File
"C:\Python27\lib\site-packages\scipy\signal\__init__.py", line 286,
in
from ._max_len_seq
import max_len_seq
ImportError: DLL load failed: %1 不是有效的 Win32
应用程序。
----------------------------------------------------------------------
Ran 22384 tests in 503.381s
FAILED (KNOWNFAIL=60, SKIP=1864, errors=1)
//[***]
re-uninstall scipy and remove the files not uninstalled
manully[***]
// install scipy again
C:\Python27\Lib\site-packages\pip>pip install
scipy-0.18.1-cp27-cp27m-win_amd64.whl
Processing
c:\python27\lib\site-packages\pip\scipy-0.18.1-cp27-cp27m-win_amd64.whl
Installing collected packages: scipy
Successfully installed
scipy-0.18.1
//
TESTstatsmodels
C:\Python27\Lib\site-packages\pip>python
Python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 12 2016,
05:57:31) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
>>> import
statsmodels.api ==> OK,
finally
>>>
exit()
4> 各种包列表



















