Skip to main content

require-python-3 contains this code:

if sys.version_info[0] != 3:
    print("This script requires Python 3")
    exit()

How to use

Install package

Either:

  1. Add require-python-3 to your requirements.txt file and run pip3 install -r requirements.txt

  2. Or run directly: pip3 install require-python-3

  3. Or download require_python_3.py directly and put it next to your script sources

Include module

Add import require_python_3 to your scripts that require python 3.

Metadata

Release files for require-python-3 1

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

Source distribution (sdist)

Source distribution for require-python-3 1
File Size Uploaded Provenance
require-python-3-1.tar.gz 1.4 kB Without provenance Details

Release files / require-python-3-1.tar.gz

Download URL require-python-3-1.tar.gz
Size 1.4 kB
Tags Source
SHA-256 checksum
How to use checksums
25b741f8cf8293c4952635725106901ac59c1311153de6376a3116dec50a2046
BLAKE2b-256 checksum
How to use checksums
2576e18099108e3028ee0ec33b727d08427eabf6d6d405059f05f127bcf4a063
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for require-python-3 1

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

1 This release

1 release file 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