Positron

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 flake8
  • pytest - Testing framework
  • black - Code formatting
  • flake8 - Linting

JavaScript Dependencies (for React apps)

Required for React Development

React (>=18.0.0)

npm install react react-dom

Vite (>=5.0.0) - Build tool and dev server

npm install vite @vitejs/plugin-react

Example 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

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 webkit2gtk

Installation Methods

git clone https://github.com/tomlin7/positron.git
cd positron
pip install -r requirements.txt

Method 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-framework

Dependency 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 pywebview

Linux: 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.0

React app won't start

Solution:

cd examples/react-app
npm install  # Install Node.js dependencies first

Port already in use

If port 5173 is already in use:

  1. Change port in vite.config.js:
export default defineConfig({
  server: {
    port: 5174,  // Change port
  }
})
  1. Update DevServer in main.py:
dev_server = DevServer(
    cwd=str(Path(__file__).parent),
    port=5174  # Match new port
)

Minimum Versions

PackageMinimum VersionRecommended
Python3.83.11+
pywebview6.0Latest
Node.js16.0.018+ LTS
React18.0.0Latest
Vite5.0.0Latest

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

PlatformEngineVersion
Windows 10/11Chromium (EdgeHTML)Latest WebView2
macOSWebKitSystem version
LinuxWebKit2GTK2.x

License Compatibility

All dependencies are compatible with MIT license:

  • pywebview: BSD License
  • React: MIT License
  • Vite: MIT License
  • Positron: MIT License

On this page