如何修复python构建中的ModuleNotFound错误?

2024-09-27 22:19:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图从github构建一个未加引导的chrome源代码。我是按照下面链接中的说明操作的,但我真的不知道如何继续。在

我安装了Python2.7和3.7,将它们设置在路径中。在

使用了git clone命令,也跳过了replace命令和gitcheckout,因为我没有得到它们。在

So, I tried the "py build.py" command and got this error.

C:\Users\aquasp\ungoogled-chromium-windows>py build.py
Traceback (most recent call last):
  File "build.py", line 24, in <module>
    import buildkit.config
ModuleNotFoundError: No module named 'buildkit'

有什么建议吗?在

以下是我遵循的命令:

git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-windows.git
# Replace TAG_OR_BRANCH_HERE with a tag or branch name
git checkout --recurse-submodules TAG_OR_BRANCH_HERE
py build.py
py package.py

https://github.com/ungoogled-software/ungoogled-chromium-windows


Tags: pyhttpsgit命令buildgithubcomclone
1条回答
网友
1楼 · 发布于 2024-09-27 22:19:18

我假设你在windows机器上。尝试运行参数为“buildkit”的dos“which”命令,如下所示:


哪个buildkit


输出将是在windows计算机的path变量中搜索目录,如下所示:


其中:(/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/system32/Wbem:/c/WINDOWS/system32/WindowsPowerShell/v1中没有buildkit 等。。。在


在路径或上找不到“buildkit”python.exe不在路上。在


尝试“which python”或“which py”进行测试python.exe或者机器路径中的py。 如果python.exe结果如下:


/c/Program Files/python/python


如果找不到


其中:在(/c/WINDOWS/system32:etc)中找不到python。。。在


最后,添加buildkit或python.exe或py到机器路径变量,如下所示:


设置路径=%path%;加上\new\path


C:\Users>;echo%path%


C:\WINDOWS\system32;plus\new\path

相关问题 更多 >

    热门问题