Skip to content

Installation

pyswarm can be installed from PyPI or directly from source via GitHub.


PyPI

For using the PyPI package in your project, add it to your configuration file:

[project.dependencies]
pyswarm = "*" # (1)!
  1. Specifying a version is recommended
pyswarm>=0.1.0

pip

pip install --upgrade --user pyswarm # (1)!
  1. You may need to use pip3 instead of pip depending on your Python installation.
python -m venv .venv
source .venv/bin/activate
pip install --require-virtualenv --upgrade pyswarm # (1)!
  1. You may need to use pip3 instead of pip depending on your Python installation.

Note

The command to activate the virtual environment depends on your platform and shell. More info

uv

uv add pyswarm
uv sync
uv venv
uv pip install pyswarm

pipenv

pipenv install pyswarm

poetry

poetry add pyswarm

pdm

pdm add pyswarm

hatch

hatch add pyswarm

GitHub

Install the latest development version directly from the repository:

pip install --upgrade "git+https://github.com/eggzec/pyswarm.git#egg=pyswarm"

Building locally

Clone and build from source if you want to modify or test local changes:

git clone https://github.com/eggzec/pyswarm.git
cd pyswarm
pip install -e .

Dependencies

  • Python 3.10+
  • NumPy