[英]The code execution cannot proceed because python37.dll was not found
I have a piece of code in C++ into which I am trying to include the Python.h library in order to manage the GIL (to speed things up).我在 C++ 中有一段代码,我试图在其中包含 Python.h 库以管理 GIL(以加快速度)。 Despite adding the proper includes, libraries and path addresses (I am using Visual Studio 2019), I still obtain the following error message:尽管添加了正确的包含、库和路径地址(我使用的是 Visual Studio 2019),我仍然收到以下错误消息:
As far as I know, I correctly added the address of the DLL in the $PATH for this project, as shown:据我所知,我在这个项目的$PATH中正确添加了DLL的地址,如图:
What am I forgetting here?我在这里忘记了什么?
Are you running this program in release mode?您是否在发布模式下运行该程序? After switching from debug to release, the project properties of debug mode will not be inherited, so it is necessary to reset the project properties.从debug切换到release后,debug模式的项目属性不会被继承,所以需要重新设置项目属性。
You could also try to place the dll file in the.exe directory or write the dll path into the project properties.也可以尝试将dll文件放在.exe目录下或者将dll路径写入工程属性。
At the same time, it is also necessary to check whether the dll file is accidentally deleted by the antivirus software.同时还要检查dll文件是否被杀毒软件误删。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.