Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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.

Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(1.4 kB) Copy SHA256 Hash SHA256
Source None Oct 16, 2014

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate