Skip to main content
python_shebang Description
==========================

[![Build Status](https://travis-ci.org/yahoo/python_shebang.svg?branch=master)](https://travis-ci.org/yahoo/python_shebang)

This package provides a command that can be run from /usr/bin/env on the
shebang line of a script that will find an appropriate python interpreter
to run it.

Unlike plain /usr/bin/env this script allows specifying the version of python
and python modules that are required.


Supported Operating Systems
===========================
This script is designed to operate on Unix operating systems. It is of no
value on Windows which does not use shebang.


Dependencies
============
python_shebang is written to be able to run under any python version 2.6 or
higher using only modules in the python standard library.


Examples
========

Here is a shebang line that will run the script with a python2.6 interpreter
that has both the foo and bar modules:

```#!/usr/bin/env python_shebang version:2.6 module:foo module:bar```


This shebang line will run the script with a python 3 interpreter that has
the paramiko module:

```#!/usr/bin/env python_shebang version:3 module:paramiko```


Running the command directly will give a python shell that meets the
requirements (the asyncio module was added in python 3.4):

```
$ python_shebang module:asyncio
Python 3.4.0 (v3.4.0:04f714765c13, Mar 15 2014, 23:02:41)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
```


If a compatible interpreter cannot be found it will generate an exception (the
asyncio module was added in python 3.4)

```
$ python_shebang module:asyncio version:3.3
Traceback (most recent call last):
File "/usr/bin/python_shebang", line 173, in <module>
version, modules, python_interpreters=python_interpreters
File "/usr/bin/python_shebang", line 139, in __search_for_interpreters
raise PythonNotFound('No usable python interpreters found')
__main__.PythonNotFound: No usable python interpreters found
```

Metadata

Release files for pythonenv 0.0.34

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythonenv 0.0.34
File Size Uploaded Provenance
pythonenv-0.0.34.tar.gz 5.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pythonenv 0.0.34
File Interpreter ABI Platform
pythonenv-0.0.34-py2-none-any.whl Python 2 none any Details

Total release size: 13.1 kB

Release files / pythonenv-0.0.34.tar.gz

Download URL pythonenv-0.0.34.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6e00b3df70373f77deb0fac7795928ee113462b5f7c30e4d333913ac4cd32d38
BLAKE2b-256 checksum
How to use checksums
e5eb14e2e50432cda9fc9d08398d01cee3dd2443a150623226538d57fcee5e56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pythonenv-0.0.34-py2-none-any.whl

Download URL pythonenv-0.0.34-py2-none-any.whl
Size 7.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
5c5eccc5a56d60a3cfb4e996820d981eb78385b16cc5882d0446a6203a8d3a06
BLAKE2b-256 checksum
How to use checksums
684141ac9c6315e3a083e27c19417d785abec6913a9d0c1a7dda17636fb9b620
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pythonenv 0.0.34

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.34 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page