require-python-3 contains this code:
if sys.version_info != 3:
print("This script requires Python 3")
How to use
- Add require-python-3 to your requirements.txt file and run
pip3 install -r requirements.txt
- Or run directly: pip3 install require-python-3
- Or download require_python_3.py directly and put it next to your script sources
Add import require_python_3 to your scripts that require python 3.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.