找不到Python库和/或G++找不到编译器

发布于 2025-02-05 19:55:41 字数 570 浏览 2 评论 0原文

我对Python有不同的可执行文件(顺便说一句,我在Windows上工作),包括C:\ MSYS64 \ Mingw64 \ bin和c:\ programData \ anaconda3。

当我添加我的路径变量时,c:\ msys64 \ mingw64 \ bin时,python无法编译。当我将其删除并取而代之的是C:\ programData \ anaconda3时,找不到G ++编译器。

问题是:要执行我的cmake ..命令,我需要Python以及G ++编译器。

我以为我可以将C:\ programData \ anaconda3放在我的路径中(以便正确找到Python),并在我的Cmake命令行中添加一个选项,例如Python_required_compiler(以便正确地找到G ++编译器)。我不知道如何使用python_required_compiler。

注意:在C:\ msys64 \ mingw64 \ bin中,有G ++。EXE和python.exe。在C:\ programData \ anaconda3中,只有python.exe。

您的建议是什么?

非常感谢 !

I have different executables for python (by the way I am working on Windows), including C:\msys64\mingw64\bin and C:\ProgramData\Anaconda3.

When I add to my path variables the C:\msys64\mingw64\bin , Python fails to compile. When I remove it and put instead the C:\ProgramData\Anaconda3, the g++ compiler is not found.

The thing is : to execute my cmake .. command, I need python as well as the g++ compiler to be found.

I was thinking I could put the C:\ProgramData\Anaconda3 in my path (so that it finds python correctly) and adding an option to my cmake command line, like Python_REQUIRED_COMPILER (so that it finds the g++ compiler correctly). I don't know how to use the Python_REQUIRED_COMPILER though.

Note : in C:\msys64\mingw64\bin there is g++.exe and also the python.exe. In C:\ProgramData\Anaconda3 there is only python.exe.

What would be your suggestions ?

Thank you very much !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文