Installation¶
Requirements¶
- Python 3.12 or higher
- pip (Python package manager)
Installation Methods¶
From Source (Development)¶
For development or to get the latest features:
# Clone the repository
git clone https://github.com/MolCrafts/molpy.git
cd molpy
# Install in development mode
pip install -e .
From PyPI (Coming Soon)¶
Once released, you'll be able to install MolPy directly from PyPI:
pip install molcrafts-molpy
With Optional Dependencies¶
For development work:
pip install -e ".[dev]"
For documentation building:
pip install -e ".[doc]"
Verify Installation¶
After installation, verify that MolPy is working correctly:
In [1]:
Copied!
import molpy as mp
print(mp.version)
# Test basic functionality
box = mp.Box.cubic(10.0)
print(f"Box volume: {box.volume}")
import molpy as mp
print(mp.version)
# Test basic functionality
box = mp.Box.cubic(10.0)
print(f"Box volume: {box.volume}")
0.2.0 Box volume: 1000.0000000000007
Development Setup¶
If you plan to contribute to MolPy:
# Clone the repository
git clone https://github.com/MolCrafts/molpy.git
cd molpy
# Install with development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks (automatically formats code)
pre-commit install
# Run tests to verify setup
pytest tests/
Troubleshooting¶
Common Issues¶
Import errors: Make sure you've activated the correct Python environment and that all dependencies are installed.
Version conflicts: MolPy requires Python 3.12+. If you're using an older version, consider using a virtual environment with Python 3.12+.
Missing dependencies: Some features require optional dependencies. Check the error message for specific package requirements.