Installation
This guide will help you install pyetm and set up your development environment.
Prerequisites
Before installing pyetm, ensure you have Python 3.12 or later installed on your system.
Check Your Python Version
You should see output like Python 3.12.0 or higher.
Installing Python
If you need to install or upgrade Python:
Download the installer from python.org and run it.
Add to PATH
Make sure to check "Add Python to PATH" during installation.
Installation Methods
Method 1: pip (Recommended for Users)
Install pyetm directly from PyPI:
To install a specific version:
Method 2: Poetry (Recommended for Development)
If you're contributing to pyetm or want to work with the source code:
-
Install Poetry (if not already installed):
-
Clone the repository:
-
Install dependencies:
-
Activate the virtual environment:
Method 3: From Source
To install directly from the GitHub repository:
Virtual Environments
Best Practice
Always use a virtual environment to isolate your project dependencies.
Using venv
Create a virtual environment:
Activate it:
Install pyetm:
Using Poetry
Poetry automatically manages virtual environments for you:
Verifying Installation
After installation, verify that pyetm is working correctly:
Or from the command line:
You should see the version number printed (e.g., 2.0.0b9).
Optional Dependencies
pyetm has minimal required dependencies, but you may want to install additional packages for specific use cases:
For Jupyter Notebooks
For Data Analysis
These are already included in the base installation of pyetm.
Next Steps
Now that you have pyetm installed, proceed to the Quick Start Guide to create your first scenario!
Troubleshooting
SSL Certificate Errors
If you encounter SSL certificate errors when connecting to the ETM API, see the Configuration Guide for solutions.
Import Errors
If you see ModuleNotFoundError: No module named 'pyetm':
- Ensure your virtual environment is activated
- Verify the installation with
pip list | grep pyetm - Try reinstalling:
pip install --force-reinstall pyetm
Permission Errors
If you see permission errors during installation:
- Use a virtual environment (recommended)
- Or install with the
--userflag:pip install --user pyetm - Never use
sudo pip installas it can cause system-wide conflicts