Questions tagged [pypy]

PyPy is an implementation of the Python language. Do not confuse with PyPI, the package index. General Python questions should just be tagged with python.

PyPy is a fast, very compliant, self-hosting implementation of the Python language. PyPy started out being a Python interpreter written in the Python language itself. It is built using the language.

PyPy has several advantages and distinctive features, including:

  • Speed: thanks to its Just-in-Time (JIT) compiler, Python programs often run faster on PyPy.

  • Sandboxing: PyPy provides the ability to run untrusted code in a fully secure way.

  • Stackless: PyPy can be configured to run in stackless mode, providing micro-threads for massive concurrency.

Programmers interested in following PyPy's progress should check the Dev Site and the PyPy Status Blog. For background, see PyPy - Goals and Architecture Overview.

Releases and builds

At this time there are three PyPy release series with binaries for x86, ARM, and PPC, on Linux, Mac OS/X and Windows:

  • PyPy2.7 v5.6.0 (the Python2.7 compatible release)
  • PyPy3.3 v5.5.0 (the Python3.3 compatible release)
  • PyPy-STM v2.5.1 (Linux x86-64 only)

More informations about builds and versions on download page. There are also nightly builds available.

794 questions
0
votes
1 answer

List comprehension is much slower than index-access in PyPy3 to create a list

I tested the codes below with the time function of Bash. Why is a list comprehension not fast in PyPy3, although it is the fastest in CPython to create a list? Is this because some optimizations are implemented in PyPy3 for the index-access? #…
solzard
  • 93
  • 1
  • 5
0
votes
1 answer

Build Python File with PyPy

I have python file. If i run this file with python it takes 100 seconds to finish. If I run this python file with PyPy3 windows 32bit, it just takes 20 seconds. I will share my python file. So Is it possible to run this script with pypy in non…
Emrexdy
  • 156
  • 1
  • 2
  • 8
0
votes
1 answer

Fastest way to read many inputs in PyPy3 and what is BytesIO doing here?

Recently I was working on a problem that required me to read many many lines of numbers (around 500,000). Early on, I found that using input() was way too slow. Using stdin.readline() was much better. However, it still was not fast enough. I found…
green frog
  • 156
  • 1
  • 8
0
votes
1 answer

Unable to install cx_Oracle in pypy3

When I am trying to install cx_Oracle on pypy3, I am getting the below error message: ========================================================================================== Using cached…
0
votes
2 answers

Compile opencv-python for pypy3

I want to use pypy for better Python performance. I installed pypy via snap on Ubuntu 18.04. I am now able to use pypy in virtualenv (Actually pipenv is what I'm using) Trying to compile opencv-python for pypy3 in a virtualenv from git repo by: git…
xendi
  • 2,332
  • 5
  • 40
  • 64
0
votes
0 answers

module not found in Pypy venv for flask wsgi

I'm trying to switch my flask WSGI application from CPython to Pypy, so I've set up a nex virtual env using pypy3 -m venv VENV_DIRECTORY. Then activated the venv and installed the dependencies using pip. When I start the python console and write…
0
votes
1 answer

Tkinter Package doesn't work well on pypy3(Windows 10)

Recently, I installed pypy3.6 on my computer. I tried to run tkinter like this: Python 3.6.9 (1608da62bfc7, Dec 23 2019, 12:38:24) [PyPy 7.3.0 with MSC v.1911 32 bit] on win32 Type "help", "copyright", "credits" or "license" for more…
Andy Zhou
  • 152
  • 1
  • 10
0
votes
0 answers

Install pip and numpy for pypy3 OS Debian

How can I install pypy3 numpy and pip for Debian OS? I'm using docker container if it matters. TO install pip and numpy I'm using this: RUN ["apt-get", "-y", "install", "python3-pip"] and RUN ["apt-get", "-y", "install", "python3-numpy"] but what…
Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
0
votes
1 answer

how do I troubleshoot or report an incompatibility between pathos and pypy

I've got some simulation code I've written using the simPy framework. To run multiple simulations with different parameters I'm unable to use the standard Python multiprocessing module, as it won't successfully pickle all the arguments I need to…
ljwobker
  • 832
  • 2
  • 10
  • 20
0
votes
1 answer

How to set the content of a closure cell?

The following question shows how to create a closure cell object, in order to programmatically construct functions with closures. However, there's a chicken-and-egg problem here where I need to create the cells to create the function, but I may not…
secondperson
  • 148
  • 1
  • 4
0
votes
2 answers

PyPy not finding packages

I'm relatively new to coding, this is my first Stack Overflow question! I recently installed PyPy. It works fine if the code I'm running doesn't import much. But when my code tries to import, e.g., NumPy, I get: "ModuleNotFoundError: No module named…
0
votes
1 answer

Pypy does not find Flask on Raspberry Pi

I am running a flask server on buster raspbian on my Raspberry Pi Zero W microcomputer. I am not using any environments and I am running my server by command sudo python www.py The server is working fine but is a bit slow. So my idea was to use…
Pygmalion
  • 785
  • 2
  • 8
  • 24
0
votes
0 answers

Why are there relative and absolut differences in performance among flow statements in CPython and pypy?

I'm reading the book Learning python (by Mark Lutz) and I use one of the programs shown in the book to measure the difference between flow statements. As I'm working in a project currently, I would like to know how faster pypy can be than my…
Lucas
  • 1,166
  • 2
  • 14
  • 34
0
votes
1 answer

Why ModuleNotFoundError occurs when trying to run script with PyPy3?

I have a Python script which runs perfectly with CPython (under virtualenv), unfortunately throws ModuleNotFoundError error when I run it with PyPy3 (under virtualenv). My package is parser and I import Analyze with from parser.Analyze import…
she hates me
  • 1,212
  • 5
  • 25
  • 44
0
votes
1 answer

pypy no module named dateutil

I'm trying to import dateutil in pypy, which I've got the following error. Importing dateutil in python2.7 didn't return an error [root@]# python Python 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2 Type…