Pydre is a Python package that can be installed using a Python package manager. While pip works, we recommend using uv for a more robust and isolated environment.
Set up a new Pydre project directory with uv¶
1. Install uv¶
Follow the instructions at uv's official website to install it on your system. You will likely need to restart your terminal after installation.
2. Set up your project directory¶
Create a new project directory and navigate to it:
Initialize a uv project:
Add Pydre as a dependency:
3. Install Dependencies¶
uv will install pydre and all dependencies in a virtual environment specific to your project. To sync the dependencies, run:
4. Verify Installation¶
Check that Pydre was installed correctly:
The first run of python after installing and syncing may take several seconds while the python system prepares the dependencies. You should see the help output showing available command line options.
5. Start Using Pydre¶
Now you can run Pydre with your project files :
To run a specific analysis target using just:
If you want to try an example project file, follow along with the Basic Analysis tutorial.
Troubleshooting¶
If you encounter any issues:
- Check any error messages in the terminal.
- Verify that your project file is properly formatted.
- If you are still having problems, please open an issue on GitHub.
Setting up pydre with pip¶
1. Install Python¶
Ensure you have Python installed on your system. You can download it from python.org.
2. Set up your project directory¶
Create a new project directory and navigate to it:
3. Create a virtual environment¶
Set up a virtual environment to isolate your project dependencies:
Activate the virtual environment:
- On Windows:
- On macOS/Linux:
4. Install Pydre¶
Use pip to install Pydre:
5. Verify Installation¶
Check that Pydre was installed correctly:
You should see the help output showing available command line options.
Next Step: Basic Analysis Guide¶
Setting up a development environment¶
If you want to contribute to Pydre or modify its source code, you can set up a development environment. You will need to clone the Pydre repository:
If you are more comfortable with rye, you can use that instead of uv.