简体   繁体   English

x64 Python Wheels是否需要x86 Visual C ++库?

[英]Are the x86 Visual C++ libraries needed for x64 Python Wheels?

Are the x86 Visual C++ libraries ( vc_redist.x86.exe ) ever needed for running x64 Python Wheels with C/C++ extensions on Windows, or x64 Visual C++ libraries ( vc_redist.x64.exe ) are sufficient? 在Windows上运行带有C / C ++扩展名的x64 Python Wheels是否需要x86 Visual C ++库( vc_redist.x86.exe ),还是x64 Visual C ++库( vc_redist.x64.exe )足够?

For instance the x64 Tensorflow Python Wheel does not need the x86 Visual C++ libraries: 例如,x64 Tensorflow Python Wheel不需要x86 Visual C ++库:

tensorflow-1.10.0-cp36-cp36m-win_amd64.whl tensorflow-1.10.0-CP36-cp36m-win_amd64.whl

But I don't know if it is true for every x64 Python Wheel. 但是我不知道每个x64 Python Wheel是否都适用。 Maybe a Python Wheel can contain both x86 and x64 machine code. 也许Python Wheel可以同时包含x86和x64机器代码。

I'd expect not, unless it was starting a separate process from a 32-bit executable. 我希望不会,除非它是从32位可执行文件开始一个单独的进程。 A 64-bit process can't execute 32-bit machine code, and most Python stuff just runs as part of the main Python process. 64位进程无法执行32位机器代码,大多数Python东西只是作为主要Python进程的一部分运行。

(Technically you could do something crazy in hand-written assembly language in a DLL or something: a far jump to a 32-bit code segment, but then it would have a hard time making system calls. I've never heard of anyone actually doing that, and it wouldn't let you automatically make use of 32-bit libraries anyway, so it's not even really relevant for this question.) (从技术上讲,您可以使用DLL中的手写汇编语言执行某些疯狂的操作或类似的操作:跳到32位代码段,但是那样很难进行系统调用。我从未真正听说过任何人这样做,无论如何也不会让您自动使用32位库,因此与该问题甚至都不相关。)

The use-case for starting a 32-bit process from a 64-bit Python process might be to use some 32-bit-only stuff, like legacy libraries or something. 从64位Python进程启动32位进程的用例可能是使用一些仅32位的东西,例如旧版库或其他东西。 Otherwise it would just be silly to build a 32-bit instead of 64-bit executable if you were going to include a separate executable in the first place to go with your Python module. 否则,如果首先要在Python模块中包含一个单独的可执行文件,那么构建32位而不是64位可执行文件将很愚蠢。

暂无
暂无

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

相关问题 如何为x86计算机重新编译x64 blender python脚本? - How to recompile an x64 blender python script for x86 computers? 错误:C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe ' 退出失败 - ERROR: C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit 带有SEEK_END的fseek返回“无效参数”错误,以在Windows7 x64上使用python x86 C扩展库管理大数据(7GB) - fseek with SEEK_END returns a “Invalid argument” error to manage large data(7GB) with python x86 C extension lib on windows7 x64 Python:致命错误 LNK1112:模块机器类型“x64”与目标机器类型“x86”冲突 - Python: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' 构建 Python 扩展失败(“kernel32.lib”无法打开 |“x64”与目标机器类型“x86”冲突) - Building Python extension fails ("kernel32.lib" cannot be opened | "x64" conflicts with target machine type "x86") 我如何知道要返回哪个实际的dll(x86 v x64)? - How do I tell which actual dll is being returned (x86 v x64)? Windows x64 vs x86:硬件 vs. 操作系统 vs. 进程 - Windows x64 vs x86: Hardware vs. OS vs. process Windows x64上可返回的Python 2. * x86(ie32bit)id()函数的最高数目是多少? - What is the highest number Python 2.* x86 (i.e.32bit) id() function on Windows x64 can return? 为什么 64 位 `pip install MySQL-python` 指的是 `C:\\Program Files (x86)\\`? - Why 64-bit `pip install MySQL-python` refers to `C:\Program Files (x86)\`? DLL加载失败,同时没有为x86和x64 DLL显示有效的Win32应用 - DLL Load Failed, Not a Valid Win32 App showing for both x86 & x64 DLLs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM