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
15
votes
5 answers

Getting Pypy to recognize third party modules

Just a quick question, how do I get pypy to recognize third pary modules that I have in Python? For instance, I get the following error. from tables import * ImportError: No Module named tables Which is basically saying that it cannot find my…
jab
  • 5,673
  • 9
  • 53
  • 84
14
votes
4 answers

PyPy on Windows 7 x64?

I am trying to use PyPy on a Windows 7 x64 machine but do not find any way to do it. Apparently there is a win32 binary, but no x64 binary or installation guide. I am currently using Python 2.7.2 win64 (Python 2.7.2 (default, Jun 12 2011, 14:24:46)…
Thomas
  • 1,053
  • 2
  • 11
  • 20
14
votes
2 answers

what is statically typed in RPython?

It is often stated that RPython (a subset of Python) is statically typed. (E.g. on Wikipedia.) Initially, I wondered how they would add that to Python and thought that they might have added the requirement to add statements such as assert…
Albert
  • 65,406
  • 61
  • 242
  • 386
14
votes
1 answer

PyPy significantly slower than CPython

I've been testing a cacheing system of my making. Its purpose is to speed up a Django web application. It stores everything in-memory. According to cProfile most of the time in my tests is spent inside QuerySet._clone() which turns out to be…
julx
  • 8,694
  • 6
  • 47
  • 86
14
votes
1 answer

Guidelines to write fast code for PyPy's JIT

PyPy's JIT can make Python code execute much faster than CPython. Are there a set of guidelines for writing code that can be optimised better by the JIT compiler? For example, Cython can compile some static code into C++, and it has guidelines to…
highBandWidth
  • 16,751
  • 20
  • 84
  • 131
14
votes
3 answers

GUI library for PyPy

Is there presently any GUI library that can be used for development in PyPy?
user559611
14
votes
2 answers

Why is this improved sieve slower with pypy?

def sieve(n): nums = [0] * n for i in range(2, int(n**0.5)+1): if nums[i] == 0: for j in range(i*i, n, i): nums[j] = 1 return [i for i in range(2, n) if nums[i] == 0] def sieve_var(n): nums = [0]…
qwr
  • 9,525
  • 5
  • 58
  • 102
14
votes
2 answers

pypy memory usage grows forever?

I have a complicated python server app, that runs constantly all the time. Below is a very simplified version of it. When I run the below app using python; "python Main.py". It uses 8mb of ram straight away, and stays at 8mb of ram, as it…
DavidColquhoun
  • 153
  • 1
  • 6
13
votes
1 answer

Equivalent to python's -R option that affects the hash of ints

We have a large collection of python code that takes some input and produces some output. We would like to guarantee that, given the identical input, we produce identical output regardless of python version or local environment. (e.g. whether the…
Daniel Martin
  • 23,083
  • 6
  • 50
  • 70
12
votes
1 answer

Whats the difference between PyPy and PyPI

This is probably a really stupid question but whats the difference between 'PyPy' and 'PyPI'? Are they the same thing?
ozn
  • 1,990
  • 3
  • 26
  • 37
12
votes
2 answers

Why is Pypy's deque so slow?

Here is a (slightly messy) attempt at Project Euler Problem 49. I should say outright that the deque was not a good choice! My idea was that shrinking the set of primes to test for membership would cause the loop to accelerate. However, when I…
Benjamin Hodgson
  • 42,952
  • 15
  • 108
  • 157
11
votes
5 answers

Developing PyPy's Rpython as a general programming language

Is there any interest in developing Rpython (Restricted Python) from the PyPy project as a general purpose programming language? Perhaps it could be a fork from the PyPy project. Does such a project exist? Since the programs are compiled, one could…
highBandWidth
  • 16,751
  • 20
  • 84
  • 131
11
votes
5 answers

Where can I learn more about PyPy's translation function?

I've been having a hard time trying to understand PyPy's translation. It looks like something absolutely revolutionary from simply reading the description, however I'm hard-pressed to find good documentation on actually translating a real world…
tslocum
  • 3,422
  • 5
  • 30
  • 33
11
votes
2 answers

What happened on March 16th 1984?

I am trying to figure out what's special about March 16th, 1984. On a virtual machine I am using (nothing special about it), Python (as well as PyPy) crashes when trying to use mktime with what seems to be a perfectly reasonable time struct. $…
Benoît
  • 16,798
  • 8
  • 46
  • 66
10
votes
2 answers

Does PyPy work with asyncio?

Does PyPy support the aio and Python 3.5? I need the performance of PyPy and asynchrous code of asyncio. Also I need to use async/await in my code. Is that possible? If so, what are the nuances?
Artem Selivanov
  • 1,867
  • 1
  • 27
  • 45