python应用运行报错,部分错误信息如下:
Traceback (most recent call last):
import _freqencoder as _backend
ModuleNotFoundError: No module named ‘_freqencoder’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
……
File “\freqencoder\backend.py”, line 29, in
raise RuntimeError(“Could not locate a supported Microsoft Visual C++ installation”)
RuntimeError: Could not locate a supported Microsoft Visual C++ installation
这个错误表明应用在加载 _freqencoder
模块时失败了,原因是无法找到 Microsoft Visual C++ 编译器(cl.exe
)编译,跟另一篇文章问题是一样的《python应用报错ModuleNotFoundError: No module named ‘_raymarching_face’》,
解决方法:
先看电脑上是否安装了VS 【使用C++的桌面开发】,然后再到freqencoder目录下修改setup.py和backend.py中cl.exe的实际路径地址,然后重新运行setup编译即可,
具体步骤可以查看这篇文章《python应用报错ModuleNotFoundError: No module named ‘_raymarching_face’》