Installation Guide¶
This guide covers the installation of MSUthemes and its dependencies.
Requirements¶
MSUthemes requires:
- Python 3.8 or higher
- NumPy >= 1.20.0
- matplotlib >= 3.5.0
- pandas >= 1.3.0
Optional dependencies:
- seaborn >= 0.12.0 (for seaborn integration)
- plotly >= 5.0.0 (for plotly support)
Installing MSUthemes¶
Via pip (Recommended)¶
Install MSUthemes using pip:
To install with optional dependencies:
From Source¶
To install the latest development version from GitHub:
For development with all dev dependencies:
Verifying Installation¶
To verify that MSUthemes is installed correctly:
import msuthemes
print(msuthemes.__version__)
# Check available modules
from msuthemes import colors, palettes, themes, bigten, data
print("✓ MSUthemes installed successfully!")
Font Installation¶
MSUthemes includes the Metropolis font, which is automatically bundled with the package. The font needs to be registered with matplotlib:
from msuthemes import register_metropolis_fonts, is_metropolis_available
# Register Metropolis fonts
register_metropolis_fonts()
# Verify font is available
if is_metropolis_available():
print("✓ Metropolis font is ready!")
else:
print("⚠ Metropolis font not available. You may need to:")
print(" 1. Clear matplotlib font cache")
print(" 2. Restart Python")
Clearing matplotlib Font Cache¶
If the Metropolis font is not recognized after registration, you may need to clear matplotlib's font cache:
After clearing the cache, restart Python and register the fonts again.
Troubleshooting¶
Import Errors¶
If you encounter import errors:
Make sure MSUthemes is installed in your current Python environment:
Font Not Found¶
If matplotlib doesn't recognize the Metropolis font:
- Clear matplotlib's font cache (see above)
- Restart your Python session
- Re-register the fonts:
The verbose=True option will print detailed information about font registration.
Dataset Not Found¶
If you get a "Dataset not found" error when loading BigTen data:
This usually means the package wasn't installed correctly. Try reinstalling:
Dependency Conflicts¶
If you encounter dependency conflicts, create a fresh virtual environment:
Platform-Specific Notes¶
Windows¶
On Windows, you may need to install Microsoft Visual C++ 14.0 or greater for some dependencies.
Download Visual C++ Build Tools
macOS¶
On macOS, make sure you have Xcode command line tools installed:
Linux¶
On Linux, you may need to install additional system dependencies:
Getting Help¶
If you encounter issues not covered here:
- Check the GitHub Issues
- Search for similar problems in closed issues
- Open a new issue with:
- Your Python version (
python --version) - Your MSUthemes version (
pip show msuthemes) - The complete error message
- A minimal reproducible example
- Your Python version (
Next Steps¶
Now that MSUthemes is installed, check out the Quick Start guide to start creating MSU-branded visualizations!