Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows pip install 报错 #124

Open
liuzhao1225 opened this issue Sep 14, 2023 · 1 comment
Open

Windows pip install 报错 #124

liuzhao1225 opened this issue Sep 14, 2023 · 1 comment

Comments

@liuzhao1225
Copy link

liuzhao1225 commented Sep 14, 2023

Windows10
运行命令set "CMAKE_ARGS=-DGGML_CUBLAS=ON" && pip install chatglm-cpp[api] --force-reinstall -v --no-cache
错误信息为

  FileTracker : error FTK1011: 未能创建新的文件跟踪日志文件: C:\Users\sz\AppData\Local\Temp\pip-install-_dmkbk3k\chatglm-cpp_12ef0742b1ef4e078360f737653b6712\build\temp.win-amd64-cpython-310\Release\chatglm_cpp._C\third_party\sentencepiece\src\sentencepiece-static.dir\Release\sentence.F1FF1A9E.tlog\Lib-link.write.1.tlog。系统找不到指定的路径。 [C:\Users\sz\AppData\Local\Temp\pip-install-_dmkbk3k\chatglm-cpp_12ef0742b1ef4e078360f737653b6712\build\temp.win-amd64-cpython-310\Release\chatglm_cpp._C\third_party\sentencepiece\src\sentencepiece-static.vcxproj]
 
  ...balbalba...

  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '-j']' returned non-zero exit status 1.
  error: subprocess-exited-with-error

对比README

cmake -B build
cmake --build build -j --config Release

是否应该改为Command '['cmake', '--build', 'build', '--config', 'Release', '-j']'

P.S.
Win中应该是set "CMAKE_ARGS=-DGGML_CUBLAS=ON"还是set "CMAKE_ARGS=DGGML_CUBLAS=ON"?(加横杠会导致import chatglm_cpp._C as _C报错)

@darkyzhou
Copy link

设置环境变量关闭 MsBuild 的 TrackFileAccess 应该可以解决问题:

$env:TRACKFILEACCESS="false"
pip install 'chatglm-cpp[api]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants