Text-to-CAD Python Environment Dependencies: Complete Setup Guide
The text-to-cad Python environment dependencies are split across multiple requirements.txt files, with requirements-dev.txt serving as the core foundation containing editable local packages and test utilities, while skill-specific directories add specialized libraries like playwright and ezdxf only when needed.
The earthtojake/text-to-cad repository organizes its Python dependencies using a modular architecture rather than a single monolithic requirements file. This approach allows contributors to install only the packages necessary for their specific workflow, whether they are developing core CAD functionality, running the web viewer, or processing specific file formats. Understanding this dependency structure is essential for setting up a functional development environment or deployment pipeline.
Core Development Dependencies
The foundation of the text-to-cad Python environment is defined in [requirements-dev.txt](https://github.com/earthtojake/text-to-cad/blob/main/requirements-dev.txt) at the repository root. This file handles the editable local packages that point directly to source code within the repository.
requirements-dev.txt Structure
The core file installs three editable packages using pip's editable mode (-e):
--editable ./packages/cadpy--editable ./packages/cadpy_metadata--editable ./viewer/moveit2_server
These entries correspond to the repository's internal modules located in the packages/ and viewer/ directories. Installing them with --editable makes the modules importable without requiring a separate wheel build, allowing immediate reflection of source code changes during development.
The file also includes test-only dependencies on lines 26-30:
networkxlxmlpytesttrimesh
These packages support the repository's test suite but are not required for production skill execution.
Skill-Specific Python Requirements
Individual skills within the skills/ directory maintain their own requirements.txt files to manage format-specific dependencies.
CAD Skill Dependencies
The [skills/cad/requirements.txt](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/requirements.txt) file includes:
--editable ./scripts/packages/cadpyplaywright
The playwright package supports browser-based testing and automation for CAD generation workflows.
DXF Skill Dependencies
For DXF file processing, [skills/dxf/requirements.txt](https://github.com/earthtojake/text-to-cad/blob/main/skills/dxf/requirements.txt) adds:
--editable ./scripts/packages/cadpyezdxf
The ezdxf library provides specialized tools for reading and writing Drawing Exchange Format (DXF) files.
CAD-Viewer Skill Dependencies
The viewer runtime defined in [skills/cad-viewer/requirements.txt](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad-viewer/requirements.txt) requires:
--editable ./scripts/packages/cadpyplaywright
This configuration supports the web-based CAD visualization interface.
Metadata-Only Skills
The URDF, SRDF, and SDF skills require only metadata processing capabilities. Their respective files—[skills/urdf/requirements.txt](https://github.com/earthtojake/text-to-cad/blob/main/skills/urdf/requirements.txt), [skills/srdf/requirements.txt](https://github.com/earthtojake/text-to-cad/blob/main/skills/srdf/requirements.txt), and [skills/sdf/requirements.txt](https://github.com/earthtojake/text-to-cad/blob/main/skills/sdf/requirements.txt)—each contain:
--editable ./scripts/packages/cadpy_metadata
These lightweight configurations import only the metadata package without additional third-party libraries.
Installing the Dependencies
To set up the text-to-cad Python environment correctly, install the files in sequence, starting with the core development requirements.
Install the core development environment first:
pip install -r requirements-dev.txt
Then install specific skills based on your use case. For the CAD skill:
pip install -r skills/cad/requirements.txt
For the web viewer:
pip install -r skills/cad-viewer/requirements.txt
To run the test suite (which uses pytest, networkx, lxml, and trimesh from requirements-dev.txt):
pytest
If you need only metadata processing for robot description formats, you can install a minimal subset:
pip install -r skills/urdf/requirements.txt
Summary
- Core dependencies reside in
requirements-dev.txtand include editable installs forcadpy,cadpy_metadata, andmoveit2_server, plus test utilities (pytest,networkx,lxml,trimesh). - Skill-specific files in
skills/{cad,dxf,cad-viewer}/requirements.txtadd runtime dependencies likeplaywrightandezdxfthat are not needed for all use cases. - Metadata-only skills (URDF, SRDF, SDF) depend solely on the
cadpy_metadatapackage without additional third-party libraries. - Always install the core
requirements-dev.txtbefore adding skill-specific requirements to ensure editable packages are properly linked.
Frequently Asked Questions
What is the difference between requirements-dev.txt and skill-specific requirements files?
requirements-dev.txt establishes the shared foundation containing editable local packages and testing tools used across the entire repository. Skill-specific requirements.txt files (located in skills/cad/, skills/dxf/, etc.) contain only the additional third-party libraries needed for that particular functionality, allowing minimal installations when you do not need the full feature set.
Why does text-to-cad use editable installs for local packages?
The repository uses --editable ./packages/... syntax to install cadpy, cadpy_metadata, and moveit2_server as editable packages. According to the earthtojake/text-to-cad source code, this approach makes the local modules importable during development without requiring a wheel build step, ensuring that changes to the source code are immediately available to Python's import system.
Do I need to install all skill dependencies to use text-to-cad?
No, you only need to install the dependencies for the specific skills you intend to use. For example, if you are working exclusively with URDF files, you can install only skills/urdf/requirements.txt and skip the playwright and ezdxf requirements needed for the CAD viewer and DXF processing skills.
Which dependencies are only required for testing?
networkx, lxml, pytest, and trimesh are test-only utilities defined in requirements-dev.txt (lines 26-30). These packages support the repository's test suite and validation workflows but are not imported by the production skill code. You can omit these if you are not running the test suite, though they are automatically included when you install the development requirements.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →