Verification

After installation, check the Python package, required headers, and compiler. The next page uses them together to build a complete extension.


1. Verify the Installed Package

Run these commands in your activated virtual environment:

# Check prik and NumPy
python3 -c "from importlib.metadata import version; import prik, numpy; print('prik:', version('prik')); print('NumPy:', numpy.__version__)"

# Check the command-line interface
python3 -m prik --help

2. Verify the Required Headers

Print the Python and NumPy header directories:

python3 -c "import sysconfig; print(sysconfig.get_path('include'))"
python3 -c "import numpy; print(numpy.get_include())"

Both commands should print existing directories.


3. Verify the Compiler Pair

For the recommended GNU path:

gfortran --version
gcc --version

For Intel IFX or LLVM Flang, check both commands in the pair:

# Intel
ifx --version
icx --version

# LLVM
flang --version
clang --version

Both commands for your chosen compiler should report a version. If either is missing, install it or add its bin directory to PATH.


Troubleshooting Guide

Failure Type Recommended Action
Cannot import prik / NumPy Check active virtual environment
A header directory is missing Reinstall Python development files or NumPy
Compiler not found Fix PATH or install both executables from a supported pair

Next