lipku / LiveTalking

Real time interactive streaming digital human
https://livetalking-doc.readthedocs.io/
Apache License 2.0
3.91k stars 558 forks source link

求助:RuntimeError: Could not locate a supported Microsoft Visual C++ installation #164

Open xiwwix opened 3 months ago

xiwwix commented 3 months ago

运行app.py时遇到了以下问题: (nerfstream) D:\lipkumetahuman-stream\metahuman-stream>python app.py Traceback (most recent call last): File "D:\lipkumetahuman-stream\metahuman-stream\ernerf\raymarching\raymarching.py", line 10, in import _raymarching_face as _backend ModuleNotFoundError: No module named '_raymarching_face'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\lipkumetahuman-stream\metahuman-stream\app.py", line 332, in from ernerf.nerf_triplane.network import NeRFNetwork File "D:\lipkumetahuman-stream\metahuman-stream\ernerf\nerf_triplane\network.py", line 6, in from .renderer import NeRFRenderer File "D:\lipkumetahuman-stream\metahuman-stream\ernerf\nerf_triplane\renderer.py", line 10, in from .. import raymarching File "D:\lipkumetahuman-stream\metahuman-stream\ernerf\raymarching__init__.py", line 1, in from .raymarching import * File "D:\lipkumetahuman-stream\metahuman-stream\ernerf\raymarching\raymarching.py", line 12, in from .backend import _backend File "D:\lipkumetahuman-stream\metahuman-stream\ernerf\raymarching\backend.py", line 28, in raise RuntimeError("Could not locate a supported Microsoft Visual C++ installation") RuntimeError: Could not locate a supported Microsoft Visual C++ installation

安装的VS是2022社区版,已按照网络教程添加了系统变量,问题仍然存在,希望能得到帮助,谢谢😭!

charles4song commented 3 months ago

您好,问题解决了么?

xiwwix commented 3 months ago

您好,问题解决了么? 可以先试试把ernerf下面的几个文件夹里有的setup.py都先运行一遍python setup.py install

yaoweixiao-ux commented 2 months ago

这个问题的正确解法是在整个工程中搜索find_cl_path():然后找下你的H:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools在哪个位置,比如我的找到是在H盘,所以我会把

find cl.exe

def find_cl_path():
    import glob
    for edition in ["Enterprise", "Professional", "BuildTools", "Community"]:
        paths = sorted(glob.glob(r"C:\\Program Files (x86)\\Microsoft Visual Studio\\*\\%s\\VC\\Tools\\MSVC\\*\\bin\\Hostx64\\x64" % edition), reverse=True)
        if paths:
            return paths[0]

中的 paths = sorted(glob.glob(r"C:\Program Files (x86)\Microsoft Visual Studio\\%s\VC\Tools\MSVC\\bin\Hostx64\x64" % edition), reverse=True) 替换为 paths = sorted(glob.glob(r"H:\Program Files (x86)\Microsoft Visual Studio\\%s\VC\Tools\MSVC\\bin\Hostx64\x64" % edition), reverse=True) 问题就解决了

basakamars commented 2 months ago

首先visual studio 2022已经不存在C:\Program Files (x86)\Microsoft Visual Studio\%s\VC\Tools\MSVC\bin\Hostx64\x64,取而代之的是C:\Program Files\Microsoft Visual Studio\%s\VC\Tools\MSVC\bin\Hostx64\x64,但就算我修改了这个地方依然有这个错误出现。

xcyeye commented 3 days ago

image 我是这样解决的,我出现这个,是因为visual studio的安装目录不是在program files (x86)下 文件为ernerf/raymarching/backend.py