qualcomm/qai-appbuilder/env-troubleshooting

Claude Code and agent skill by qualcomm/qai-appbuilder

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install qualcomm/qai-appbuilder/env-troubleshooting

SKILL.md

The same SKILL.md was published earlier as qualcomm/qai-appbuilder/env-troubleshooting.

Environment Troubleshooting (base)

🧭 Diagnosis framework: ${APP_ROOT}/factory/chat_features/model-builder/troubleshooting/_diagnosis-framework.md; this SKILL covers environment/dependency/build failures.

Responsibility

Fix WoS ARM64 environment: VS ARM64/MSBuild failures, two-Python split (x64 3.10 conversion vs ARM64 3.13 inference), missing deps, protobuf conflicts, PyTorch --index-url rules. All paths from qairt_env.json (generated by Setup.bat) — never hardcode.

Trigger signals

  • No CMAKE_C_COMPILER / CMAKE_C_COMPILER not found
  • VCTargetsPath.vcxproj / BaseOutputPath not set / MSB1009 / Failed to run MSBuild
  • ModuleNotFoundError: No module named 'qai_appbuilder' / 'cv2' / PIL
  • ImportError: cannot import name 'builder' from 'google.protobuf.internal'
  • Unclear which Python env → B10

Core knowledge

Two Python environments
Envqairt_env.json keyPythonRole
Conversionpython_x64_venvx86_64 3.10ONNX export, qairt-converter, qnn-onnx-converter, qnn-model-lib-generator (all hosts).
Runtimepython_runtime_venv (legacy alias python_arm64_venv)3.13 — aarch64 on WoS (.venv_arm64_313), x86_64 on x64 Windows (.venv_x64_313)qai_appbuilder, QNNContext, inference.

Default: python_x64_venv (most QAIRT tools link python310.dll → fail under 3.13 with Module use of python310.dll conflicts). Use python_runtime_venv only when importing qai_appbuilder/QNNContext or running inference on .bin/.dlc. Uncertain → B10. Example: GenAIBuilderFactory/libPyNetRun.pyd links python310.dll → must use python_x64_venv.

VS ARM64 / MSBuild issues

qnn-model-lib-generator and qnn-context-binary-generator.exe require the VS ARM64 build env.

  • `CMAKE_C_COMPILER not found` — vcvarsall.bat arm64 not called or VCTargetsPath → BuildTools. Fix: call "%_VCVARSALL%" arm64 in same .bat (env doesn't propagate across cmd /c).
  • `VCTargetsPath` / `BaseOutputPath not set` — BuildTools MSBuild can't compile ARM64. Fix: VCTargetsPath → Community (vc_targets_path in qairt_env.json). Verify: where.exe MSBuild.exe → ...\Community\....

✅ C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\ ❌ C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\...

qai_appbuilder import error

Use runtime Python (python_runtime_venv; legacy alias python_arm64_venv):

bat
%PYTHON_RUNTIME% -c "import qai_appbuilder; print('OK')"

Still fails → re-run Setup.bat. Offline: data\bin\uv\uv.exe pip install vendor\whl\qai_appbuilder-*.whl.

Missing deps (cv2, Pillow)

Pre-installed by Setup.bat from vendor\whl\:

PackageNotes
numpypre-installed
opencv-python-headlessheadless only. Never install opencv-python (conflicts)
Pillowvia pip install -e .; win_arm64 cp313
torch/torchvisionnot pre-installed (see index-url rule)

Fails → re-run Setup.bat. Do NOT pip install opencv-python.

protobuf conflict

cannot import name 'builder' from 'google.protobuf.internal' → onnx/tensorflow version conflict. Fix: re-run `Setup.bat`.

PyTorch --index-url rules
EnvCommand
python_x64_venvpip install torch torchvision — no --index-url
python_runtime_venv (aarch64 3.13, WoS)uv pip install torch torchvision --index-url https://download.pytorch.org/whl — MUST (ARM64 wheels off-PyPI)
python_runtime_venv (x86_64 3.13, x64 Win)uv pip install torch torchvision — no --index-url (win_amd64 on PyPI)
python_runtime_venv (other packages, any arch)uv pip install <pkg> — no --index-url

SSLCertVerificationError on weights → Invoke-WebRequest to fetch .pth, re-run export.

Architecture detection

Do NOT use $env:PROCESSOR_ARCHITECTURE / platform.machine() (emulation-affected). Use (Get-WmiObject Win32_Processor).Architecture (12=ARM64, 9=x64). Never Get-PnpDeviceProperty/Win32_SystemDriver (300-400s hang).

Verify env
powershell
$cfg = Get-Content ${APP_ROOT}\data\config\qairt_env.json | ConvertFrom-Json
& "$($cfg.python_x64_venv)\Scripts\python.exe" -c "import onnx; print('conversion env OK')"
& "$($cfg.python_runtime_venv)\Scripts\python.exe" -c "import qai_appbuilder; print('runtime env OK')"

Blocking Conditions

  • B10 — correct venv unclear → STOP, ask. Depends on what tool links against.
  • B2 — pip install needed → stop, state package + reason, ask.
  • B1 — qairt_env.json variable empty → stop, list missing vars.

Escalation

Setup.bat re-run doesn't fix, or venv undetermined → stop (B10/B1/B2). Never guess env or install unpinned versions.

Full details → references/win_qairt_setup.md.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/qualcomm/qai-appbuilder/env-troubleshooting/badge)](https://verified-skill.com/skills/qualcomm/qai-appbuilder/env-troubleshooting)

Something wrong with this skill or its page? Tell us.