Unofficial Node.js Wheel

24.14.1 · active · verified Wed Apr 15

nodejs-wheel is an unofficial Python package that distributes prebuilt Node.js binaries as wheels on PyPI. It enables Python projects to declare and install Node.js as a dependency via `pip`, providing access to `node`, `npm`, and `npx` commands within a Python environment. The current version, 24.14.1, was released on March 31, 2026, and the project generally follows the Node.js release schedule, which sees new major versions biannually in April and October. It supports Python 3.7 and above.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import and execute Node.js and npm commands directly from Python. It shows how to retrieve both the exit code and the full `subprocess.CompletedProcess` object for more detailed output handling.

import os
from nodejs_wheel import node, npm

# Run a Node.js command and get the exit code
node_version_exit_code = node(['--version'])
print(f'Node.js --version exit code: {node_version_exit_code}')

# Run a Node.js command and get the CompletedProcess object for detailed output
node_version_process = node(['--version'], return_completed_process=True)
print(f'Node.js version: {node_version_process.stdout.strip()}')

# Run an npm command
npm_version_process = npm(['--version'], return_completed_process=True)
print(f'npm version: {npm_version_process.stdout.strip()}')

view raw JSON →