如何在 Windows 中为 Python 3.4 安装 Pandas?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28560826/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I install pandas for Python 3.4 in Windows?
提问by Jon Cage
According to the docs, this should work:
根据文档,这应该有效:
Installing from PyPI
pandas can be installed via pip from PyPI.
pip install pandas This will likely require the installation of a number of dependencies, including NumPy, will require a compiler to compile required bits of code, and can take a few minutes to complete.
从 PyPI 安装
pandas 可以通过 PyPI 的 pip 安装。
pip install pandas 这可能需要安装许多依赖项,包括 NumPy,将需要编译器来编译所需的代码位,并且可能需要几分钟才能完成。
I've tried a couple of times now but it looks like it has a problem sorting out numpy?
我现在已经尝试了几次,但看起来整理 numpy 有问题?
Downloading/unpacking pandas
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in c:\python34\lib\site-packages (from pandas)
Downloading/unpacking numpy>=1.7.0 (from pandas)
Running setup.py (path:C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\setup.py) egg_info for package numpy
Running from numpy source directory.
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=2 in c:\python34\lib\site-packages (from pandas)
Installing collected packages: pandas, numpy
Running setup.py install for numpy
non-existing path in 'numpy\distutils': 'site.cfg'
non-existing path in 'numpy\f2py': 'docs'
non-existing path in 'numpy\f2py': 'f2py.1'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
blas_info:
libraries blas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
NOT AVAILABLE
non-existing path in 'numpy\lib': 'benchmarks'
lapack_opt_info:
openblas_lapack_info:
libraries openblas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python34\lib
libraries lapack_atlas not found in C:\Python34\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python34\libs
libraries lapack_atlas not found in C:\Python34\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python34\lib
libraries lapack_atlas not found in C:\Python34\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python34\libs
libraries lapack_atlas not found in C:\Python34\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
build_src
building py_modules sources
building library "npymath" sources
No module named 'numpy.distutils.msvccompiler' in numpy.distutils; trying from distutils
Running from numpy source directory.
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1526: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1535: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1538: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1432: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1443: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
warnings.warn(LapackNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1446: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
warnings.warn(LapackSrcNotFoundError.__doc__)
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
error: \GnuWin32\bin";"C:\Program was unexpected at this time.
Complete output from command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\
setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\jonc\AppData
Temp\pip-7c38q9vd-record\install-record.txt --single-version-externally-managed --compile:
non-existing path in 'numpy\distutils': 'site.cfg'
non-existing path in 'numpy\f2py': 'docs'
non-existing path in 'numpy\f2py': 'f2py.1'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
blas_info:
libraries blas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
NOT AVAILABLE
non-existing path in 'numpy\lib': 'benchmarks'
lapack_opt_info:
openblas_lapack_info:
libraries openblas not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python34\lib
libraries lapack_atlas not found in C:\Python34\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python34\libs
libraries lapack_atlas not found in C:\Python34\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python34\lib
libraries lapack_atlas not found in C:\Python34\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python34\libs
libraries lapack_atlas not found in C:\Python34\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\Python34\lib', 'C:\', 'C:\Python34\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win32-3.4
creating build\src.win32-3.4\numpy
creating build\src.win32-3.4\numpy\distutils
building library "npymath" sources
No module named 'numpy.distutils.msvccompiler' in numpy.distutils; trying from distutils
Running from numpy source directory.
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1526: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1535: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1538: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1432: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1443: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
warnings.warn(LapackNotFoundError.__doc__)
C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\numpy\distutils\system_info.py:1446: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
warnings.warn(LapackSrcNotFoundError.__doc__)
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
error: \GnuWin32\bin";"C:\Program was unexpected at this time.
----------------------------------------
Cleaning up...
Command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy\setup.py';exec(com
tattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\jonc\AppData\Local\Temp\pip-7c38q9vd-
install-record.txt --single-version-externally-managed --compile failed with error code 1 in C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\numpy
Storing debug log for failure in C:\Users\jonc\pip\pip.log
What am I missing?
我错过了什么?
回答by Jon Cage
This works for 64-bit machines:
这适用于 64 位机器:
- Download & install 64-bit Python: https://www.python.org/downloads/release/python-342/
- Download the 64-bit version of numpy from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
- pip install "numpy-1.9.2rc1+mkl-cp34-none-win_amd64.whl"
- pip install pandas
- 下载并安装 64 位 Python:https: //www.python.org/downloads/release/python-342/
- 从这里下载 64 位版本的 numpy:http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
- pip 安装“numpy-1.9.2rc1+mkl-cp34-none-win_amd64.whl”
- pip 安装Pandas
回答by Joe M.
You can easily install pandas for Python 3.4 on Windows directly via pip, by simply choosing a slightly older version than the latest pandas version. At first, you update pip with
您可以直接通过 pip 在 Windows 上轻松安装适用于 Python 3.4 的 Pandas,只需选择比最新 Pandas 版本稍旧的版本即可。首先,您更新 pip
python -m pip install -U pip
Then you install version 0.21.0 instead of the latest version that is available for Python 3.4:
然后安装 0.21.0 版本而不是 Python 3.4 可用的最新版本:
pip install pandas==0.21.0
The installation of pandas 0.21.0 should work out of the box for Python 3.4.0 - 3.4.4. You can list the available versions with:
对于 Python 3.4.0 - 3.4.4,pandas 0.21.0 的安装应该是开箱即用的。您可以列出可用版本:
pip install pandas==
If you try to install a later version, you need Visual Studio 2010 because the installer will try to build the sources.
如果您尝试安装更高版本,则需要 Visual Studio 2010,因为安装程序将尝试构建源代码。
回答by Jon Cage
I managed to get this working with the following:
我设法通过以下方式解决了这个问题:
- Download the 32-bit version from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
- pip install "numpy-1.9.2rc1+mkl-cp34-none-win32.whl"
- pip install six
- pip install pandas
- 从这里下载 32 位版本:http: //www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
- pip 安装“numpy-1.9.2rc1+mkl-cp34-none-win32.whl”
- 点安装六
- pip 安装Pandas
回答by Prasad
Assuming you already install python3.4 on your machine & you have windows OS Simply type following On command prompt type:
假设你已经在你的机器上安装了 python3.4 并且你有 Windows 操作系统只需键入以下命令提示符类型:
pip install pandas
pip 安装Pandas
Make sure that you have "pip" installed on your system
确保您的系统上安装了“pip”
for example: c:\python34\Scripts>pip install pandas
例如:c:\python34\Scripts>pip install pandas
回答by Daniyal Mahmood
C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\Scripts>pip install pandas
C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\Scripts>pip install pandas

