[英]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.