torch-npu-pyyaml-preinstall

Preinstall PyYAML before torch-npu to prevent transitive dependency failures.

39|4|Updated May 18, 2026
One-click install
npx skills add https://github.com/Fudan-SMI-lab/SEAM --skill torch-npu-pyyaml-preinstall
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: torch-npu-pyyaml-preinstall
Source: https://github.com/Fudan-SMI-lab/SEAM/tree/main/.memory/skills/torch-npu-pyyaml-preinstall
Command: npx skills add https://github.com/Fudan-SMI-lab/SEAM --skill torch-npu-pyyaml-preinstall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pre-install PyYAML to prevent torch-npu transitive dependency failure.

Core Features & Use Cases

  • Ensure PyYAML is present before torch-npu installation to avoid runtime import errors.
  • Provide guidance to modify requirements.txt and verify the dependency is accessible in the environment.
  • Use case: when setting up a new project that uses torch-npu memory visualization or other modules that import yaml.

Quick Start

Install PyYAML before or alongside torch-npu to guarantee a clean environment and prevent ModuleNotFoundError.

Frequently Asked Questions about torch-npu-pyyaml-preinstall

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does torch-npu fail with a ModuleNotFoundError for yaml?

torch-npu fails with a ModuleNotFoundError for yaml because PyYAML is a transitive dependency not automatically installed in fresh virtual environments. Pre-installing PyYAML prevents this runtime import error in modules like memory visualization.

How do I pre-install PyYAML to prevent torch-npu transitive dependency failure?

To prevent torch-npu transitive dependency failure, explicitly add PyYAML to your project's environment before torch-npu usage by running pip install PyYAML or updating requirements.txt to guarantee the dependency is accessible.

When do I need to manually install PyYAML for torch-npu?

You need to manually install PyYAML for torch-npu when setting up a new project in a fresh virtual environment where YAML is not declared, specifically when using torch-npu memory visualization or layering dependencies via requirements.txt.

Does torch-npu memory visualization require PyYAML to function correctly?

Yes, torch-npu memory visualization requires PyYAML to function correctly because it imports yaml directly. Without pre-installing PyYAML, accessing this module in a clean environment triggers a transitive dependency failure.

What is the best way to layer PyYAML in requirements.txt before torch-npu installation?

The best way to layer PyYAML in requirements.txt before torch-npu installation is to explicitly add PyYAML as a separate entry above torch-npu, ensuring the environment resolves the transitive dependency cleanly and prevents ModuleNotFoundError.