Skip to content

Installation

Install PyGraphina on your system.

Requirements

  • Python 3.10 or later
  • pip (or another Python package manager like uv or Poetry)

Installing from PyPI

The easiest way to install PyGraphina is using pip:

pip install pygraphina

Verifying Installation

After installation, verify that PyGraphina is working correctly:

import pygraphina as pg

# Create a simple graph
g = pg.PyGraph()
a, b = g.add_node(1), g.add_node(2)
g.add_edge(a, b, 1.0)

edges = g.edge_count()
print(f"Graph has {g.node_count()} nodes and {edges} edge{'s' if edges != 1 else ''}")
# Output: Graph has 2 nodes and 1 edge

If you see the output without errors, congratulations! PyGraphina is installed correctly.

Troubleshooting

ImportError: No module named 'pygraphina'

Make sure you've installed the package:

pip list | grep pygraphina

If it's not listed, reinstall using:

pip install pygraphina --force-reinstall

Python Version Issues

PyGraphina requires Python 3.10 or later. Check your Python version:

python --version

If you have multiple Python versions, you may need to use python3.10 or later explicitly:

python3.10 -m pip install pygraphina

Next Steps