在pypy3上安装pandas出错:... Microsoft Visual Studio 14.0 \\ VC \\ BIN \\ cl.exe'失败,退出状态为2

时间:2018-06-04 08:12:29

标签: python pandas pip pypy

我在pypy3上安装pandas时遇到了麻烦。当我用pip安装它时:

pypy3 -m pip install pandas

输出以以下内容开头:

    Installing collected packages: pandas
    Running setup.py install for pandas ... -    Subprocess output does not appear to be encoded as cp1252
    Subprocess output does not appear to be encoded as cp1252

短暂停顿后,我收到了很长的警告信息:

  ....
  pandas/_libs/src/parser/tokenizer.c(1412): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\string.h(344): note: Siehe Deklaration von "strncpy"
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ipandas/_libs/src/klib -Ipandas/_libs/src -IC:\Users\scandas\opt\site-packages\numpy\core\include -IC:\Users\scandas\opt\include /Tcpandas/_libs/src/parser/io.c /Fobuild\temp.win32-3.5\Release\pandas/_libs/src/parser/io.obj
  io.c
  pandas/_libs/src/klib\khash.h(574): warning C4090: "Funktion": Unterschiedliche "const"-Qualifizierer
  pandas/_libs/src/parser/io.c(30): warning C4996: 'open': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _open. See online help for details.
  C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_io.h(516): note: Siehe Deklaration von "open"
  pandas/_libs/src/parser/io.c(40): warning C4996: 'close': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _close. See online help for details.
  C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_io.h(459): note: Siehe Deklaration von "close"
  pandas/_libs/src/parser/io.c(74): warning C4996: 'close': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _close. See online help for details.
  C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_io.h(459): note: Siehe Deklaration von "close"
  pandas/_libs/src/parser/io.c(97): error C2065: "ssize_t": nichtdeklarierter Bezeichner
  pandas/_libs/src/parser/io.c(97): error C2146: Syntaxfehler: Fehlendes ";" vor Bezeichner "rv"
  pandas/_libs/src/parser/io.c(97): error C2065: "rv": nichtdeklarierter Bezeichner
  pandas/_libs/src/parser/io.c(103): error C2065: "rv": nichtdeklarierter Bezeichner
  pandas/_libs/src/parser/io.c(104): error C2065: "rv": nichtdeklarierter Bezeichner
  pandas/_libs/src/parser/io.c(115): error C2065: "rv": nichtdeklarierter Bezeichner
  pandas/_libs/src/parser/io.c(116): error C2065: "rv": nichtdeklarierter Bezeichner
  pandas/_libs/src/parser/io.c(103): warning C4996: 'read': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _read. See online help for details.
  C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_io.h(523): note: Siehe Deklaration von "read"
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

我得到的最后一个输出(红色)如下:

Command "C:\Users\UserName\opt\pypy3.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\UserName\\AppData\\Local\\Temp\\pip-install-mlyb9fgn\\pandas\\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\UserName\AppData\Local\Temp\pip-record-8f_i0pb4\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\UserName\AppData\Local\Temp\pip-install-mlyb9fgn\pandas\

我的操作系统是Windows 10 x64,我安装了Python 3.6.4,PyPy 6.0.0和Visual C ++ 2017 14.10。

我在安装NumPy时遇到了类似的问题,我通过从https://www.lfd.uci.edu/~gohlke/pythonlibs/下载一个易于编译的版本解决了这个问题。不幸的是,那里没有pandas库的PyPy版本。

1 个答案:

答案 0 :(得分:1)

这实际上看起来像是Windows上的PyPy的错误。你能加点线吗? typedef int ssize_t; 到文件<path/to/pypy>/include/pyconfig.h然后重试?

相关问题