Installationο
Quick Installο
Install puhu using pip:
pip install puhu
Platform Supportο
Puhu provides pre-built wheels for:
Linux
x86_64 (Intel/AMD 64-bit)
ARM64 (aarch64)
macOS
Intel processors (x86_64)
Apple Silicon (M1/M2/M3)
Windows
x64 (64-bit Intel/AMD)
Python Versions
Python 3.8+
If a wheel is not available for your platform, pip will attempt to build from source (requires Rust toolchain).
Building from Sourceο
Requirementsο
To build puhu from source, you need:
Python 3.8 or later
Rust 1.70 or later
Maturin
Install Rustο
If you donβt have Rust installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Or visit rustup.rs for other installation methods.
Install Maturinο
pip install maturin
Clone and Buildο
# Clone the repository
git clone https://github.com/bgunebakan/puhu.git
cd puhu
# Install development dependencies
pip install -r requirements.txt
# Build and install in development mode
maturin develop --release
# Or build a wheel
maturin build --release
Running Testsο
After building from source, run the test suite:
pytest python/puhu/tests/
Verifying Installationο
To verify that puhu is installed correctly:
import puhu
print(puhu.__version__)
# Create a test image
img = puhu.new("RGB", (100, 100), "red")
print(f"Created image: {img.size}, {img.mode}")
Troubleshootingο
Installation Failsο
If installation fails, ensure you have:
Updated pip:
pip install --upgrade pipRust installed (for source builds):
rustc --versionMaturin installed:
pip install maturin
Import Errorsο
If you get import errors after installation:
Verify installation:
pip show puhuCheck Python version compatibility (3.8+)
Try reinstalling:
pip install --force-reinstall puhu
Platform-Specific Issuesο
macOS: If you encounter code signing issues, you may need to allow the library in System Preferences > Security & Privacy.
Linux: Ensure you have the required system libraries (usually pre-installed on most distributions).
Getting Helpο
If you encounter issues:
Check GitHub Issues
Open a new issue with details about your platform and error messages
Include Python version (
python --version) and Rust version (rustc --version) if building from source