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
2 answers

High performance weighted random choice for python 2?

I have the following python method, which selects a weighted random element from the sequence "seq" randomly weighted by other sequence, which contains the weights for each element in seq: def weighted_choice(seq, weights): assert len(seq) ==…
user582175
  • 954
  • 12
  • 17
0
votes
0 answers

Installing pip for pypy on a MacOs Sierra

I did a sudo easy-install pip which installed pip for python. However, I am unable to use it for pypy. I did a ./pypy -m ensurepip which worked on another Mac (El Capitan) but not on the one I need to get working. The error I get is as such: dyId:…
confused_kid
  • 63
  • 1
  • 11
0
votes
1 answer

dyId: Symbol not found: _clock_gettime

I am trying to execute a python code using PyPy2 v5.10 on MacOS El Capitan 10.11.6. However, I keep getting this error during runtime. dyld: lazy symbol binding failed: Symbol not found: _clock_gettime Referenced from:…
confused_kid
  • 63
  • 1
  • 11
0
votes
0 answers

getting error on installing package pyldap-2.4.45 on pypy3 environment

cc -pthread -shared build/temp.linux-x86_64-3.5/Modules/LDAPObject.o build/temp.linux-x86_64-3.5/Modules/ldapcontrol.o build/temp.linux-x86_64-3.5/Modules/common.o build/temp.linux-x86_64-3.5/Modules/constants.o…
Vicky Gupta
  • 576
  • 6
  • 13
0
votes
0 answers

How do CPython 3 and PyPy3 resolve builtin modules path?

Execute the following commands: touch sys.py touch parser.py python3 -c 'import sys; print(sys)' pypy3 -c 'import sys; print(sys)' python3 -c 'import parser; print(parser)' pypy3 -c 'import parser; print(parser)' When CPython or PyPy try to import…
Labo
  • 2,482
  • 2
  • 18
  • 38
0
votes
2 answers

PYPY, CFFI import error cffi library '_heap_i' has no function, constant, or global variable named 'initQueue'

So I am trying to use cffi to access a c library quickly in pypy. I am using my macpro with command line tools 9.1 specifically I am comparing a pure python priority queue, with heapq, with a cffi, and ctypes for a project. I have got code from…
channon
  • 362
  • 3
  • 16
0
votes
0 answers

Optimisation techniques for large arrays in PYPY

I am new to PYPY and trying to use it with large arrays being worked on in a large iteration for loop. What libraries can I use to optimize for large arrays and are there any other optimizing techniques I should be aware of? PLEASE NOTE THE…
user3152377
  • 429
  • 1
  • 5
  • 17
0
votes
2 answers

Mocking the datetime library in pypy raises TypeError when comparing 2 mocked objects

I'm doing some tests for my python library which is supposed to work on all python versions - 27, 33, 34, 35, 36 and pypy. In my tests I'm mocking the datetime library and they all work, except when I run them in pypy (see why I bolded that earlier?…
0
votes
1 answer

How to install iPython in a Pypy virtualenv on Ubuntu 17.04

I'm trying to install IPython in a virtualenv. I've set up my Virtualenv to use Pypy 2.7 instead of CPython 3. When I use the IPython installed by apt-get, it ends up using CPython 3 instead of Pypy. When I try to pip install ipython, I get a…
wlad
  • 2,073
  • 2
  • 18
  • 29
0
votes
2 answers

How to compile PyPy for OpenWrt?

I'm trying to compile PyPy for use on an OpenWrt configuration, but I am having a really hard time doing it. My main problems are: Each time I change the Makefile I am forced to start the translating process of PyPy again. Is there a way to avoid…
HGitere
  • 37
  • 2
  • 10
0
votes
2 answers

Execution import error after success pip install compilation

My trouble On clean Ubuntu 16.04 environment, I want to install and use Crossbar.io. I have already installed pypy from ppa, virtualenv and activate a new pypy virtualenv. I had some error while installing crossbar via command pip install crossbar…
VisiBoost
  • 28
  • 5
0
votes
1 answer

Bug with PyPy + gzip?

A very simple case: import gzip import cStringIO s = 's' * 1000 buf = cStringIO.StringIO() gzip.GzipFile(fileobj=buf, mode='wb').write(s) buf.tell() Under Python 2.7, buf.tell() returns 29 and the contents of the buffer can be unzipped to…
user1102018
  • 4,369
  • 6
  • 26
  • 33
0
votes
0 answers

ListIndex Error in PyPy but Python code runs fine

So I've been working on this really bad python code I wrote a while ago and as an easy way to optimize it, I tried to use PyPy instead of python 2.7 but while trying to run it, PyPy gives me a list index out of range error whereas python runs the…
0
votes
1 answer

Switch from pypy to CPython for sections of code

Is there any feature in pypy that allows for a standard CPython 2.7 interpreter to be run for a designated section of code? I have a function that has pandas code within it (its a performance intensive function, benefiting greatly by pandas), all…
jab
  • 5,673
  • 9
  • 53
  • 84
0
votes
1 answer

Debugging Pypy3

With the release of pypy3.5, I want to try running a python3 project in pypy. Doing so, I hit the following error: RPython traceback: File "pypy_interpreter.c", line 38718, in BuiltinCodePassThroughArguments1_funcrun_obj File…
pythonic metaphor
  • 10,296
  • 18
  • 68
  • 110