Installation
Requirements
Python 3.8 or higher
pip (Python package installer)
Dependencies
pyNavalToolbox requires the following packages:
VTK - Visualization Toolkit for 3D geometry operations
NumPy - Numerical computing
SciPy - Scientific computing (optimization algorithms)
These are automatically installed when you install the package.
Installing from Source
Clone the repository and install using pip:
git clone https://github.com/NavalToolbox/pynavaltoolbox.git
cd pyNavalToolbox
pip install -e .
Development Installation
To install with development dependencies (for testing, linting, and documentation):
pip install -e ".[dev]"
This will install:
pytest and pytest-cov for testing
flake8 for linting
sphinx and related tools for documentation
build tools for creating distributions
Verifying Installation
You can verify the installation by importing the package:
import pynavaltoolbox
print(pynavaltoolbox.__version__)
# Check that main components are available
from pynavaltoolbox import Hull
from pynavaltoolbox.hydrostatics import HydrostaticsCalculator
from pynavaltoolbox.stability import StabilityCalculator
print("pyNavalToolbox installed successfully!")
Or run the tests:
pytest tests/
Optional: VTK Installation Notes
On some systems, VTK may require additional system dependencies:
macOS (with Homebrew):
brew install vtk
Ubuntu/Debian:
sudo apt-get install python3-vtk9
Windows:
VTK wheels are available on PyPI and should install automatically with pip.