Installation
Requirements
- Python 3.10 or higher
- pip (Python package installer)
Install from PyPI
The easiest way to install ndastro-engine is from PyPI:
Install for Development
If you want to contribute or modify the package:
-
Clone the repository:
-
Create a virtual environment (recommended):
-
Install in development mode with dev dependencies:
Verify Installation
To verify the installation works correctly:
import ndastro_engine
from datetime import datetime
from ndastro_engine.ayanamsa import get_lahiri_ayanamsa
# Calculate ayanamsa
date = datetime(2026, 1, 11, 12, 0, 0)
ayanamsa = get_lahiri_ayanamsa(date)
print(f"Lahiri Ayanamsa: {ayanamsa:.6f}°")
If this runs without errors, you're all set!
Dependencies
The package automatically installs these dependencies:
- skyfield (>= 1.53): For astronomical calculations
- pytz (>= 2025.2): For timezone handling
Optional Development Dependencies
For development, these additional packages are included:
- pytest: Testing framework
- pytest-cov: Code coverage
- pytest-xdist: Parallel test execution
- ruff: Linting and formatting
- mypy: Static type checking
Troubleshooting
Import Errors
If you encounter import errors, ensure you're using Python 3.10 or higher:
Ephemeris Data
On first run, skyfield will automatically download JPL ephemeris data (~10MB). This is a one-time download and is cached locally.
Virtual Environment Issues
If you have issues with virtual environments, try recreating it: