简体   繁体   中英

Error with installing pandas on pypy3: …Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

I am getting troubles to install pandas on pypy3. When I use pip to install it:

pypy3 -m pip install pandas

The output starts with the following:

    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

After a short pause, I get a long text of warnings:

  ....
  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

The last output (in red) I get is the following:

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\

My OS is Windows 10 x64 and I have Python 3.6.4, PyPy 6.0.0 and Visual C++ 2017 14.10 installed.

I had had a similar problem with installing NumPy, which I solved by downloading a readily compiled version from: https://www.lfd.uci.edu/~gohlke/pythonlibs/ . Unfortunately, there is no PyPy version for pandas library there.

That actually looks like a bug for PyPy on windows. Could you add the line typedef int ssize_t; to the file <path/to/pypy>/include/pyconfig.h and try again?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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