首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >vaex核心windows供应商/pybind11 11/include\pybind11 11/numpy.h(35):错误C2065:'ssize_t':未声明的标识符

vaex核心windows供应商/pybind11 11/include\pybind11 11/numpy.h(35):错误C2065:'ssize_t':未声明的标识符
EN

Stack Overflow用户
提问于 2022-03-05 18:43:42
回答 1查看 334关注 0票数 0

当试图从源构建包时,我有一个错误。

代码语言:javascript
复制
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\Lenovo\AppData\Local\Temp\pip-build-env-6gtrxy7u\overlay\Lib\site-packages\numpy\core\include -Ivendor/pybind11/include -Ivendor/pybind11/include -Ivendor/string-view-lite/include -Ivendor/boost -IC:\Python\Python310\include -IC:\Python\Python310\Library\include -Ivendor\pcre\Library\include -IC:\Python\Python310\include -IC:\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpsrc\strings.cpp /Fobuild\temp.win-amd64-3.10\Release\src\strings.obj /EHsc
      strings.cpp
      vendor/pybind11/include\pybind11/numpy.h(35): error C2065: 'ssize_t': undeclared identifier
      vendor/pybind11/include\pybind11/numpy.h(35): error C2338: ssize_t != Py_intptr_t
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-vmdjo61j\vaex-core_8c00779b22c745ba90d323d5396909c4\src\string_utils.hpp(208): warning C4244: '=': conversion from 'char32_t' to 'char', possible loss of data
      vendor\pcre\Library\include\pcrecpp.h(701): warning C4251: 'pcrecpp::RE::pattern_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'pcrecpp::RE'
      C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\xstring(4905): note: see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
      src\strings.cpp(273): warning C4018: '>': signed/unsigned mismatch
      src\strings.cpp(282): warning C4018: '>': signed/unsigned mismatch
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for vaex-core
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=181e9fce6f02e9d9ededfda32bcd4f51fcb0cc556bb9245af0294c279e6bd36e
  Stored in directory: c:\users\lenovo\appdata\local\pip\cache\wheels\22\73\06\557dc4f4ef68179b9d763930d6eec26b88ed7c389b19588a1c
  Building wheel for aplus (setup.py) ... done
  Created wheel for aplus: filename=aplus-0.11.0-py3-none-any.whl size=4410 sha256=70a7aab29eb4cd9eafb025d16acc94ffb3259763f346ec37838f05a65f591d4a
  Stored in directory: c:\users\lenovo\appdata\local\pip\cache\wheels\74\ed\14\4d7bffd9475a07582e0c256b9b1ddbbc1f49c58e3150d356f4
Successfully built future aplus
Failed to build vaex-core
ERROR: Could not build wheels for vaex-core, which is required to install pyproject.toml-based projects

由于这一点,我无法在windows上安装python3.10中的金库核心。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-06-10 22:15:12

这只是在Vaex构建过程中的第一个问题,因为python3.10 还不支持

部分解是编辑.../pybind11/include/pybind11/numpy.h以提供ssize_t的定义。

#include statements之后,在文件顶部附近找到以下代码行:

代码语言:javascript
复制
#if defined(_MSC_VER)
#  pragma warning(push)
#  pragma warning(disable: 4127) // warning C4127: Conditional expression is constant
#endif

改为:

代码语言:javascript
复制
#if defined(_MSC_VER)
#  pragma warning(push)
#  pragma warning(disable: 4127) // warning C4127: Conditional expression is constant
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71364994

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档