Installation¶
Get Bytesize up and running in your Python environment quickly and easily.
📋 Requirements¶
Before installing Bytesize, ensure you have:
- Python 3.9 or higher
- pip (usually comes with Python)
You can check your Python version with:
🚀 Installation Methods¶
🔧 Development Installation¶
If you want to contribute to Bytesize or use the latest development version:
From Source¶
# Clone the repository
git clone https://github.com/your-username/bytesize.git
cd bytesize
# Install in development mode
pip install -e .
With Development Dependencies¶
✅ Verify Installation¶
After installation, verify that Bytesize is working correctly:
# Test basic import
from bytesize import Storage, StorageUnit
# Create a simple storage object
storage = Storage(1, StorageUnit.GB)
print(f"✅ Bytesize installed successfully! Test storage: {storage}")
# Test conversion
mb_value = storage.convert_to_mb()
print(f"✅ Conversion working: {mb_value}")
Expected output:
🐍 Virtual Environment (Recommended)¶
We recommend installing Bytesize in a virtual environment to avoid conflicts:
🚨 Troubleshooting¶
Common Issues¶
Python Version
If you get a "Python version not supported" error:
Package Not Found
If pip can't find the package:
Environment Issues¶
If you're having environment-related issues:
-
Check Python path:
-
Verify virtual environment:
-
Clear pip cache:
🔄 Upgrading¶
To upgrade to the latest version:
# Upgrade with pip
pip install --upgrade bytesize
# Check version
python -c "import bytesize; print(bytesize.__version__)"
🗑️ Uninstallation¶
To remove Bytesize:
📦 Dependencies¶
Bytesize has zero external dependencies - it only uses Python's standard library:
pathlib
- For cross-platform path operationsplatform
- For platform detectionenum
- For storage unit definitionstyping
- For type annotations
This means:
- ✅ Faster installation
- ✅ Smaller footprint
- ✅ Fewer security concerns
- ✅ Better compatibility
🎯 Next Steps¶
Now that you have Bytesize installed:
-
Jump right into using Bytesize with examples
-
Learn about storage units and core concepts
-
See real-world usage examples
-
Explore the complete API documentation