Skip to main content

Makes your script require python 3

Project description

require-python-3 contains this code:

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

How to use

Install package


  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 directly and put it next to your script sources

Include module

Add import require_python_3 to your scripts that require python 3.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for require-python-3, version 1
Filename, size File type Python version Upload date Hashes
Filename, size require-python-3-1.tar.gz (1.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page