Setup#
This guide covers different ways to install AFL-agent based on your needs.
Prerequisites#
Before installing AFL-agent, ensure you have:
Python 3.11 or later
pip (Python package installer)
git (for installation from source)
Basic Installation#
The simplest way to install AFL-agent is directly from GitHub using pip:
pip install git+https://github.com/usnistgov/afl-agent
Development Installation#
For development work, you’ll want to clone the repository and install in editable mode:
git clone https://github.com/usnistgov/afl-agent.git
cd afl-agent
pip install -e .
Optional Dependencies#
AFL-agent has several optional dependency groups that can be installed based on your needs:
jupyter
: Jupyter notebook supporttensorflow
: TensorFlow and GPflow dependenciespytorch
: PyTorch dependenciesautomation
: Dependencies for automation featuresdev
: Development tools and testing dependencies
Install with optional dependencies using square brackets:
# Install with jupyter support
pip install -e .[jupyter]
# Install with multiple optional dependencies
pip install -e .[jupyter,tensorflow]
# Install all optional dependencies
pip install -e .[all]
Installation from a Specific Branch#
To install from a specific branch or commit:
# Install from a branch
pip install git+https://github.com/usnistgov/afl-agent.git@branch-name
# Install from a specific commit
pip install git+https://github.com/usnistgov/afl-agent.git@commit-hash
Offline Installation#
For environments without internet access, you can create a wheel file:
On a machine with internet access:
git clone https://github.com/usnistgov/afl-agent.git cd afl-agent pip wheel .
Copy the generated
.whl
file to the offline machine and install:pip install AFL_agent-version-py3-none-any.whl
Troubleshooting#
Common installation issues and solutions:
Version Conflicts: If you encounter dependency conflicts, try creating a new virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install git+https://github.com/usnistgov/afl-agent
Missing Dependencies: If you see import errors after installation, ensure you have the necessary optional dependencies:
pip install -e .[all]
Build Failures: Make sure you have the latest pip and build tools:
pip install --upgrade pip setuptools wheel