Add this shebang line to the top of the program:

#!/usr/bin/env pypy

If you want to do this manually, just enter pypy main.py on the command-line.

Answer from simonzack on Stack Overflow
🌐
DigitalOcean
digitalocean.com › community › tutorials › getting-started-with-pypy
Getting Started with PyPy | DigitalOcean
October 10, 2024 - In this article learn about PyPy an alternative Python interpreter which is compatible with most Python libraries, making it a great option for performance-i…
Discussions

how to use PyPy
Not sure about conda, you can use pip for some things. Basically some things work (quite a few), things that use C extensions work to an extent. The best thing to do is try things. You just run pypy instead of python to choose the interpreter. If you use create a venv or virtualenv you can run it run "python" and it will run pypy, and run pip instead of "pypy -mpip" More on reddit.com
🌐 r/learnpython
3
1
October 10, 2023
python - How to use pypy - Stack Overflow
I have just installed pypy (pypy3.5-v7.0.0-win32.zip from https://bitbucket.org/pypy/pypy/downloads/) to run my code faster and now I don't know how to use it for my python 3.5.0 program. I sow this More on stackoverflow.com
🌐 stackoverflow.com
python - How to use PyPy on Windows? - Stack Overflow
I was wondering how to use PyPy 1.8 on Windows XP 32-bit. I downloaded the zip file off the website and installed it into a My Documents file. Initially, I thought it was similar to psyco in that I... More on stackoverflow.com
🌐 stackoverflow.com
PyPy the unknown Hero.
How ?? Is that really true?? More on reddit.com
🌐 r/django
9
44
July 31, 2024
🌐
Pypy
doc.pypy.org › en › latest › install.html
Downloading and Installing PyPy — PyPy documentation
The quickest way to start using PyPy is to download a prebuilt binary for your OS and architecture. You may be able to use either use the most recent release or one of our development nightly build.
🌐
Real Python
realpython.com › pypy-faster-python
PyPy: Faster Python With Minimal Effort – Real Python
August 27, 2026 - PyPy is a very compliant Python interpreter that is a worthy alternative to CPython 2.7, 3.6, and soon 3.7. By installing and running your application with it, you can gain noticeable speed improvements. How much of an improvement you’ll see depends on the application you’re running. ... The examples in this tutorial use Python 3.6 since that’s the latest version of Python that PyPy is compatible with.
🌐
Boston University
bu.edu › tech › support › research › software-and-programming › common-languages › python › special › pypy
PyPy : TechWeb : Boston University
[rcs@scc1 ~] conda create -c conda-forge -n my-pypy-env pypy python=3.9 ... Configure this environment to use strict channel priority so that conda-forge is always checked first for packages.
🌐
Zenva
gamedevacademy.org › home › python › pypy tutorial – complete guide
Pypy Tutorial - Complete Guide - GameDev Academy
December 12, 2023 - PyPy is an alternative Python interpreter that aims to offer improved execution speed and better memory consumption. While standard Python, also known as CPython, executes each line of code bit by bit, PyPy uses a Just-In-Time (JIT) compiler, leading to significantly faster execution times.
Find elsewhere
🌐
Py Libs
py-libs.com › home › libraries › python language › pypy
Pypy Tutorial for Beginners | Py Libs
Core beginner skills for pypy: install into a virtual environment, run one minimal example end-to-end, read one failure carefully, then expand into a small project with clear inputs, outputs, and checks.
🌐
Anthony Shaw
tonybaloney.github.io › posts › pypy-in-production.html
PyPy in Production
March 10, 2022 - If you want to install locally outside of Docker, you can use one of the downloadable binaries. Once PyPy is installed, or if you’re inside a Docker image, you follow the same workflow as with CPython.
🌐
CommandMasters
commandmasters.com › commands › pypy-common
How to Use the Command 'pypy' (with examples)
Using PyPy’s REPL can also help developers experience the improved performance of their code execution in a more immediate environment compared to other Python interpreters. ... The command pypy without any arguments initiates an interactive PyPy REPL environment, where users can enter Python code line by line and get instant feedback.
🌐
Stack Overflow
stackoverflow.com › questions › 61802658 › how-to-use-pypy
python - How to use pypy - Stack Overflow
Go to your source folder where you wrote your python code. Click on the file explorer navigation bar. Delete what it says and type cmd to open the command prompt. In the command prompt type: pypy3 yourfile.py
🌐
Pypy
doc.pypy.org › en › latest › man › pypy.1.html
pypy — PyPy documentation
Add directories to pypy’s module search path. The format is the same as shell’s PATH. ... A script referenced by this variable will be executed before the first prompt is displayed, in interactive mode. ... If set to a non-empty value, equivalent to the -B option. Disable writing .pyc files. ... If set to a non-empty value, equivalent to the -i option. Inspect interactively after running the specified script. ... If this is set, it overrides the encoding used for stdin/stdout/stderr.
🌐
Python Geeks
pythongeeks.org › python geeks › learn python › what is pypy?
What is PyPy? - Python Geeks
July 7, 2023 - When run with the regular Python interpreter, this script takes several seconds to complete. However, when run with PyPy, the script runs much faster: $ time pypy fib.py 9227465 real 0m0.428s user 0m0.393s sys 0m0.035s
🌐
Geek Python
geekpython.in › install-pypy-and-use-it
How to Install PyPy and Use it?
January 6, 2025 - You can check if you are using PyPy by running the following command: You’ll notice that we used python command to check the version of PyPy installed on the system because in the virtual environment, the python command becomes a symlink (or equivalent) to the interpreter used when creating the virtual environment.
🌐
Pypy
doc.pypy.org › en › latest › faq.html
Frequently Asked Questions — PyPy documentation
As usual you may need to run the command with sudo for a global installation. You cannot import any extension module in a sandboxed PyPy, sorry. Even the built-in modules available are very limited. Sandboxing in PyPy is a good proof of concept, and is without a doubt safe IMHO, however it is only a proof of concept. It currently requires some work from a motivated developer. However, until then it can only be used for “pure Python” example: programs that import mostly nothing (or only pure Python modules, recursively).
🌐
Pypy
doc.pypy.org
Welcome to PyPy’s documentation! — PyPy documentation
Howto · Software Transactional Memory · What pypy-stm is for · Getting Started · Python 3, CPython, and others · User Guide · Implementation · See also · Remote Debugging · From the commandline · API · Security · Contributing Guidelines · Getting involved · Your first contribution · Architecture · Building · Testing · Tooling & Utilities ·
🌐
Docker Hub
hub.docker.com › _ › pypy
pypy - Official Image | Docker Hub
PyPy is a fast, compliant alternative implementation of the Python language. ... Where to get help: the Docker Community Slack⁠, Server Fault⁠, Unix & Linux⁠, or Stack Overflow⁠
🌐
ArchWiki
wiki.archlinux.org › title › PyPy
PyPy - ArchWiki
June 11, 2025 - $ pypy -m ensurepip --user $ pypy -m pip install --user --upgrade pip · Once you have pip, you can install any package you need, e.g., sqlalchemy: ... If you would prefer to install packages system-wide, just run the previous commands as root without the --user.