@bjia56/portable-python-3.12

中文文档
0.1.42发布于 2026/10/30Apache-2.0TypeScriptCommonJS零依赖构建来源已验证近 30 天下载 1833

Portable Python 3.12

原始使用文档
文档目录3 节
  1. Usage
  2. Available distributions
  3. Licensing

portable-python

GitHub Downloads (all assets, all releases) NPM Version

This project provides self-contained (hence, "portable") Python distributions to a variety of target platforms and architectures. These Python distributions can be downloaded and extracted to anywhere on the filesystem, making installation trivially easy and configurable.

Usage

To get started, download archives from GitHub releases. Alternatively, use any of the following installers:

  • npm i @bjia56/portable-python-3.9
  • npm i @bjia56/portable-python-3.10
  • npm i @bjia56/portable-python-3.11
  • npm i @bjia56/portable-python-3.12
  • npm i @bjia56/portable-python-3.13

For example, on Linux via bash:

$ wget -q https://github.com/bjia56/portable-python/releases/download/cpython-v3.12.6-build.5/python-headless-3.12.6-linux-x86_64.zip
$ unzip -qq python-headless-3.12.6-linux-x86_64.zip
$ ./python-headless-3.12.6-linux-x86_64/bin/python --version
Python 3.12.6

Or via the node installer:

$ npm i --silent @bjia56/portable-python-3.12
$ ./node_modules/@bjia56/portable-python-3.12/python-headless-3.12.6-linux-x86_64/bin/python --version
Python 3.12.6

Or via node:

var pythonExe = require("@bjia56/portable-python-3.12");
var child_process = require("child_process");
console.log(child_process.execSync(`${pythonExe} --version`).toString());

Available distributions

Currently, CPython 3.9, 3.10, 3.11, 3.12, and 3.13 are built for the following targets:

  • Linux x86_64, i386, aarch64, arm 1, riscv64, s390x, loongarch64, powerpc64le (glibc)
  • Windows x86_64, aarch64 2
  • MacOS x86_64, arm64 3
  • FreeBSD 14, 15 x86_64
  • Solaris 11 x86_64
  • Cosmopolitan Libc 4

For Linux CPython builds, the minimum glibc required is as follows:

Hardware ArchitectureMinimum glibc Version
x86_642.17
i3862.17
aarch642.17
arm2.17
riscv642.27
s390x2.19
loongarch642.36
powerpc64le2.19

For all CPython distributions except for the Cosmopolitan libc build, there are two available variants: full and headless. The distinction is that headless builds do not include any UI libraries (i.e. tkinter and its dependencies), so are better suited for non-graphical server installations.

PyPy and GraalPy distributions are also available as repackaged versions of official upstream releases. Though they are already portable, the distributions have been made available through the node installers for convenience and flexibility.

1 The arm builds target armv6, specifically the configuration of the Raspberry Pi 1. Current arm builds do not work properly on old glibc (despite the glibc 2.17 target), but a recent version of Raspbian like Debian bullseye should provide a new enough glibc to work. ↩

2 Windows x86_64 distributions require a minimum of Windows 10, while aarch64 distributions require a minimum of Windows 11. ↩

3 MacOS distributions are provided as universal2, which will work on both x86_64 and arm64. The minimum MacOS version is 10.9 on x86_64 and 11.0 on arm64. ↩

4 Cosmopolitan Libc builds are statically linked and may not support all Python features. See the Cosmopolitan Libc project's documentation for minimum operating system requirements. ↩

Licensing

The build scripts and code in this repository are available under the Apache-2.0 License. Note that compilation of Python involves linking against other libraries, some of which may include different licensing terms. Copies of the licenses from known dependencies are included under the licenses directory of each Python distribution.

版本与发布记录

@bjia56/portable-python-3.12 共发布 44 个版本,首次发布于 2024/03/15;过去 12 个月发布了 2 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.42latest2026/10/309 天前
0.1.41beta2026/10/2712 天前
0.1.402025/10/131.1 年前
0.1.392025/07/181.3 年前
0.1.382025/06/241.4 年前
0.1.372025/06/081.4 年前

关于 @bjia56/portable-python-3.12 的常见问题

@bjia56/portable-python-3.12 是什么?

Portable Python 3.12

如何安装 @bjia56/portable-python-3.12?

在项目目录运行 npm install @bjia56/portable-python-3.12,或使用 pnpm add / yarn add / bun add。

@bjia56/portable-python-3.12 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bjia56/portable-python-3.12 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bjia56/portable-python-3.12 可以商用吗?

@bjia56/portable-python-3.12 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@bjia56/portable-python-3.12 的下载量有多少?

根据 npm 官方下载统计,@bjia56/portable-python-3.12 在 2026/10/08 – 2026/11/06 这 30 天内被下载 1,833 次,日均约 61 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bjia56/portable-python-3.12 还在维护吗?

最新版本 0.1.42 发布于 2026/10/30(9 天前);至今共发布 44 个版本,其中过去 12 个月发布了 2 个;首次发布于 2024/03/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。