Dependencies
Detailed information about Positron dependencies
Dependencies
Python Dependencies
Required (Runtime)
pywebview (>=6.0)
- Cross-platform webview wrapper
- Provides real browser engine for rendering web content
- Install with:
pip install pywebview
pywebview automatically uses:
- Windows: Microsoft Edge WebView2 (via pythonnet)
- macOS: System WebKit (built-in)
- Linux: GTK WebKit2 (via PyGObject)
Platform-Specific Dependencies
Windows:
pythonnet- For WebView2 COM interop (auto-installed)
Linux:
PyGObject- For GTK bindings- System packages:
python3-gi,gir1.2-webkit2-4.0
macOS:
- No additional Python packages needed
Optional (Development)
pip install pytest black flake8pytest- Testing frameworkblack- Code formattingflake8- Linting
JavaScript Dependencies (for React apps)
Required for React Development
React (>=18.0.0)
npm install react react-domVite (>=5.0.0) - Build tool and dev server
npm install vite @vitejs/plugin-reactExample package.json
{
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.0.0"
}
}System Dependencies
Python 3.8+
- Positron requires Python 3.8 or higher
Node.js 16+
- Required for React development with Vite
- npm or yarn package manager
WebView Runtime
Edge WebView2 Runtime
- Usually pre-installed on Windows 10/11
- Download if needed: https://developer.microsoft.com/microsoft-edge/webview2/
System WebKit
- Built into macOS, no installation needed
GTK and WebKit2GTK
# Ubuntu/Debian
sudo apt-get install python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.0
# Fedora
sudo dnf install python3-gobject gtk3 webkit2gtk3
# Arch
sudo pacman -S python-gobject gtk3 webkit2gtkInstallation Methods
Method 1: Using requirements.txt (Recommended)
git clone https://github.com/tomlin7/positron.git
cd positron
pip install -r requirements.txtMethod 2: Using setup.py
git clone https://github.com/tomlin7/positron.git
cd positron
pip install -e .The -e flag installs in "editable" mode for development.
Method 3: From PyPI (Future)
Once published:
pip install positron-frameworkDependency Tree
positron-framework
└── pywebview (>=6.0)
├── bottle (built-in HTTP server)
├── proxy_tools (proxy handling)
└── Platform-specific:
├── Windows: pythonnet (WebView2 COM)
├── macOS: pyobjc (WebKit bridge - optional)
└── Linux: PyGObject (GTK/WebKit)pywebview provides full HTML5/CSS3/JavaScript support through native browser engines, giving you complete React compatibility out of the box!
Verifying Installation
Test that all imports work:
# Test Positron imports
from positron import App, BrowserWindow
from positron.ipc import ipc_main
from positron.renderer import DevServer
print("✓ Positron imports successful!")
# Test pywebview import
import webview
print("✓ pywebview import successful!")Run the test:
python -c "from positron import App, BrowserWindow; from positron.ipc import ipc_main; print('✓ All imports OK')"Troubleshooting
ImportError: No module named 'webview'
Solution:
pip install pywebviewLinux: ImportError: gi module not found
Solution: Install GTK and WebKit dependencies
sudo apt-get install python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.0React app won't start
Solution:
cd examples/react-app
npm install # Install Node.js dependencies firstPort already in use
If port 5173 is already in use:
- Change port in
vite.config.js:
export default defineConfig({
server: {
port: 5174, // Change port
}
})- Update
DevServerinmain.py:
dev_server = DevServer(
cwd=str(Path(__file__).parent),
port=5174 # Match new port
)Minimum Versions
| Package | Minimum Version | Recommended |
|---|---|---|
| Python | 3.8 | 3.11+ |
| pywebview | 6.0 | Latest |
| Node.js | 16.0.0 | 18+ LTS |
| React | 18.0.0 | Latest |
| Vite | 5.0.0 | Latest |
Platform Support
Positron works on all platforms with webview support:
- ✅ Windows 10/11 - Edge WebView2
- ✅ macOS 10.14+ - System WebKit
- ✅ Linux - GTK WebKit (Ubuntu, Fedora, Arch, etc.)
Browser Engines Used
| Platform | Engine | Version |
|---|---|---|
| Windows 10/11 | Chromium (EdgeHTML) | Latest WebView2 |
| macOS | WebKit | System version |
| Linux | WebKit2GTK | 2.x |
License Compatibility
All dependencies are compatible with MIT license:
- pywebview: BSD License
- React: MIT License
- Vite: MIT License
- Positron: MIT License