繁体   English   中英

如何在Windows中为Python 3.4安装熊猫?

[英]How do I install pandas for Python 3.4 in Windows?

根据文档 ,这应该工作:

从PyPI安装

可以通过PyPI的pip安装熊猫。

pip install pandas这可能需要安装许多依赖项,包括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

我想念什么?

这适用于64位计算机:

  1. 下载并安装64位Python: https//www.python.org/downloads/release/python-342/
  2. 从此处下载numpy的64位版本: http ://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
  3. pip安装“ numpy-1.9.2rc1 + mkl-cp34-none-win_amd64.whl”
  4. 点安装熊猫

我设法使它与以下工作:

  1. 从此处下载32位版本: http : //www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
  2. pip安装“ numpy-1.9.2rc1 + mkl-cp34-none-win32.whl”
  3. 点安装六
  4. 点安装熊猫

假设您已经在计算机上安装了python3.4,并且您具有Windows操作系统,只需在命令提示符下键入以下命令:

点安装熊猫

确保您的系统上已安装“ pip”

例如:c:\\ python34 \\ Scripts> pip install pandas

您可以直接通过pip在Windows上直接安装适用于Python 3.4的熊猫,只需选择比最新熊猫版本稍旧的版本即可。 首先,您使用

python -m pip install -U pip

然后安装版本0.21.0,而不是可用于Python 3.4的最新版本:

pip install pandas==0.21.0

对于Python 3.4.0-3.4.4,应立即安装pandas 0.21.0。 您可以通过以下方式列出可用版本:

pip install pandas==

如果尝试安装更高版本,则需要Visual Studio 2010,因为安装程序将尝试生成源。

C:\\ Users \\ DELL \\ AppData \\ Local \\ Programs \\ Python \\ Python36-32 \\ Scripts> pip安装熊猫

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM