find-python-installations
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

find-python-installations

This package finds all Python installations on the system. It looks for executables named py, python, python* or python*.* in $PATH as well as the virtual environments reported by conda env list. Symbolic links pointing to Python executables are also returned.

Installation

$ npm install find-python-installations

Usage

import { findPythonInstallations } from 'find-python-installations';

await findPythonInstallations()
// =>
{
  '/opt/homebrew/bin/python3': {
    id: '/opt/homebrew/bin/python3',
    info: {
      architectures: ['arm64'],
      isVirtualEnv: false,
      supportsVirtualEnv: true,
      version: [3, 11, 3]
    },
    leaf: true,
    path: '/opt/homebrew/bin/python3',
    symlink: true
  },
  ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i find-python-installations

Weekly Downloads

1

Version

0.2.2

License

EUPL-1.2

Unpacked Size

9.57 kB

Total Files

10

Last publish

Collaborators

  • slietar