Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

python-env

codejamninja633MIT0.2.8

Cross platform isolated embedded python environment for npm

python-env, python, env, virtualenv, python-shell, shell, embedded, isolated

readme

python-env

GitHub stars

Cross platform isolated embedded python environment for npm

Please ★ this repo if you found it useful ★ ★ ★

Features

  • Isolated embedded python environment
  • Call into python from node
  • Works on MacOS, Linux and Microsoft Windows 32 and 64 bit

Installation

This package is not intended to be used as a global dependancy.

Python 3

npm install --save python-env

Python 2

npm install --save python-env@python2

Dependencies

Usage

script.js

import { python, pip } from 'python-env';

async function main() {
  await pip(['install', '-r', 'requirements.txt']);
  await python(['script.py']);
}

main();

package.json

{
  "scripts": {
    "pip:install": "python-pip install -r requirements.txt",
    "python:script": "python-env src/script.py",
    "python:shell": "python-env",
    "python:version": "python-env --version"
  }
}

Support

Submit an issue

Screenshots

Contribute a screenshot

Contributing

Review the guidelines for contributing

License

MIT License

Jam Risser © 2018

Changelog

Review the changelog

Credits

Support on Liberapay

A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.

Add some fuel if you'd like to keep me going!

Liberapay receiving Liberapay patrons

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[0.2.8] - 2019-01-23

Fixed

  • correct python version

[0.2.7] - 2019-01-23

Fixed

  • linting errors

[0.2.0] - 2018-11-20

Added

  • support for windows

[0.1.0] - 2018-11-16

Added

  • beta release

[0.0.1] - 2018-11-16

Added

I initial release