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
6
votes
3 answers

Why is using a Python generator much slower to traverse binary tree than not?

I've got a binary tree, where the nodes interact with data. I initially implemented a standard post order recursive traversal. def visit_rec(self, node, data): if node: self.visit_rec(node.left, data) self.visit_rec(node.right,…
Stuart Lacy
  • 1,963
  • 2
  • 18
  • 30
6
votes
3 answers

how much of sklearn can I use with pypy?

The pypy project is currently adding support for numpy. My impression is that sklearn library is mainly based on numpy. Would I be able to use most of this library or there are other requirements that are not supported yet?
Donbeo
  • 17,067
  • 37
  • 114
  • 188
6
votes
1 answer

Import Numpypy when using pypy2.2

I used to have pypy verion 1.9. I could do the following to import numpypy: >pypy Python 2.7.2 (341e1e3821ff, Jun 07 2012, 15:42:54) [PyPy 1.9.0 with GCC 4.2.1] on darwin Type "help", "copyright", "credits" or "license" for more information. And now…
A.D
  • 1,480
  • 2
  • 18
  • 33
6
votes
1 answer

regex module with pypy

is there any way to use this regex module with pypy? https://pypi.python.org/pypi/regex or any alternative regex module that works with pypy and has the features of this regex module. I did copy regex module files from my python installation into…
Pooya Eghbali
  • 209
  • 2
  • 6
6
votes
1 answer

Using MySQLdb module with Pypy compiler

I'm trying Pypy compiler to see if I can speed up my code. Nevertheless, I'm having troubles with MySQLdb module, which Pypy is unable to find. I have read that MySQLdb 1.2.4 should work fine with Pypy, so I upgraded the module, and I tested that it…
Roman Rdgz
  • 12,836
  • 41
  • 131
  • 207
6
votes
2 answers

how to disable pypy assert statement?

$ ./pypy -O Python 2.7.2 (a3e1b12d1d01, Dec 04 2012, 13:33:26) [PyPy 1.9.1-dev0 with GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: `` amd64 and ppc are…
peerxu
  • 623
  • 1
  • 6
  • 13
6
votes
4 answers

How can PyPy be faster than Cpython

I have read PyPy -- How can it possibly beat CPython? and countless other things but i am not able to understand how something written in Python be faster than python itself. The only way I can think of is that PyPy somehow bypasses C and directly…
Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96
6
votes
1 answer

installing zeromq under pypy

I have installed zeromq under CPython. How can I install it that it runns also under pypy? www.zeromq.org/ The problem is it that zeromq needs Cython.
Davoud Taghawi-Nejad
  • 16,142
  • 12
  • 62
  • 82
6
votes
1 answer

Disabling std. and file I/O in Python sandbox implementation

I'm trying to set up a Python sandbox and want to forbid access to standard and file I/O. I am running the sandbox inside of a running Python server. I've already looked at modules like RestrictedPython and PyPy; however, I want to be able to…
Zach
  • 998
  • 1
  • 9
  • 26
5
votes
5 answers

How can an implementation of a language in the same language be faster than the language?

If I make a JVM in Java, for example, is it possible to make the implementation I made actually faster than the original implementation I used to build this implementation, even though my implementation is built on top of the original implementation…
ApprenticeHacker
  • 21,351
  • 27
  • 103
  • 153
5
votes
1 answer

How to get pip install PIL to work with pypy on windows 7

This works outright on a linux VM I have sitting around but running "pip install pil" under pypy on windows 7 complains about things being defined multiple times: ~\Windows\v7.1\include\basetsd.h(76) : warning C4114: same type qualifier used more…
JLK
  • 53
  • 4
5
votes
2 answers

How to install/use cx_Oracle in PyPy

I can't seem to find anything on Google or SO with information on getting cx_Oracle to work with PyPy. Can somebody please tell me if it's possible, and if so, how can I accomplish this?
PhilBot
  • 748
  • 18
  • 85
  • 173
5
votes
1 answer

multiprocessing Listeners and Clients between python and pypy

Is it possible to have a Listener server process and a Client process where one of them uses a python interpreter and the other a pypy interpreter? Would conn.send() and conn.recv() interoperate well?
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
5
votes
1 answer

Line between current Python implementations and Compiled Languages

My understanding C++ is compiled into machine code and executed. Python is compiled into bytecode This bytecode is then executed What does this execution step entail and how is it different for Cpython and PyPy? Where does the difference in…
algorithmicCoder
  • 6,595
  • 20
  • 68
  • 117
5
votes
1 answer

How does pypy handle recursions?

I have a script I wrote in python and it works fine but I was curious to see if I could speed it up. It basically is recursive script. If I run it within normal python 2.7, it takes about 30 seconds. When I run the same thing using pypy than I get…
Lostsoul
  • 25,013
  • 48
  • 144
  • 239