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

Is it possible to use PyPy with PyGame?

I've been searching and have seen mixed things on the internet about whether it is possible to use PyGame with PyPy. Particularly there is this project https://bitbucket.org/stefanor/pygame-pypy, although I'm really struggling to build it on…
Leo Sutton
  • 163
  • 1
  • 8
0
votes
2 answers

"ImportError: No module named pygame.base" - Pypy3 and pygame

After several trials for install pygame in pypy3, I did it with the bitbucket version, cloning with mercurial and installing this way: "pypypath"/bin/pypy3 setup.py However, when I'll make the import, the following error appears: Traceback (most…
648trindade
  • 689
  • 2
  • 5
  • 21
0
votes
0 answers

Segmentation fault when calling M2Crypto's X509.load_request_string in pypy env

Although in pypy compatibility list says the M2Crypto is supported, but I got segmentation fault after run less than 100 times in a loop. my code similar as below: TIMES = 1000 def main(): csr_b64 =…
Jim Horng
  • 1,587
  • 1
  • 13
  • 23
0
votes
0 answers

How to use the PyPy as the notebook interpreter?

I Have a Script for data extraction from some CSV files and bifurcating the Data into different excel files. I using Ipython for the that and I m sure it using CPython as the Default interpreter. But the script is taking too much time for the whole…
Abhishek Jain
  • 65
  • 1
  • 2
  • 8
0
votes
0 answers

Pypy compilation error

I'm trying to compile pypy on RHEL 6.6 and get the following mess of errors. I know it's a lot but here is the relevant information. It seems to get through the translation phase and tries to compile the C code: [translation:ERROR] /usr/bin/ld:…
starflyer
  • 484
  • 1
  • 11
  • 23
0
votes
0 answers

PYPY and how to install with out interfering default python 2.7 install on ubuntu

How does one install packages via easy_install? I don't want to use virtual environments. One would think I can do this easy_install --prefix=/opt/pypy/site-packages pytz But I get the below: easy_install --prefix=/opt/pypy/site-packages pytz TEST…
Tampa
  • 75,446
  • 119
  • 278
  • 425
0
votes
2 answers

Doctest succeeds in Python v2.7 but not with Python 2.6 due to inconsistent error message

I have coded up some doc test cases in my code comments and put them under travis-ci to run against Python v2.6, v2.7 and Pypy. Only v2.7 succeeded. My doctest looks like the following:: >>> a = ['a', 'b'] >>> a.index('i') Traceback (most recent…
chfw
  • 4,502
  • 2
  • 29
  • 32
0
votes
2 answers

Calling a python file within pypy

I recently moved to PyPy. It's amanzingly fast, but a lot of python libraries are not implemented yet. So I got a lot of home made python functions that I'd like to call within the PyPy code. Here's my question: is there a way to call a python file…
hulyce
  • 438
  • 3
  • 15
0
votes
2 answers

How to optimize python dynamic programming knapsack (multiprocessing?)

I've solved a problem on spoj, but it's still too slow for being accepted. I've tried to make it use multiprocessing too, but I've failed because it's still slower. The basic implemenation, even with pypy, returns "time limits exceeded" on spoj. So,…
tuxErrante
  • 1,274
  • 12
  • 19
0
votes
0 answers

Custom install Pygame

I am creating a game engine using Pygame on Windows, but my program uses a lot of CPU-intensive loops, so it is quite slow at rendering. I am using the drawPixel function to make my own custom renderer, so I can do pixel-perfect collision more…
VeryAwkwardCake
  • 339
  • 1
  • 3
  • 11
0
votes
2 answers

Getting strange error from pip-pypy when trying to install PySide

I'm using PyPy as my Python implementation, and thus, I installed pip-pypy (I'm on Arch). I then tried the following command: pip-pypy install PySide This fails with the following error: error: Failed to locate the Python library with…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
0
votes
2 answers

How to create socket in pypy sandbox

I am trying to use pypy sandbox to run some untrusted python code from users on my http server. The python code is frameworked by me and the framework needs to talk with a process on another server. So I am trying to create a socket to do the…
yonexer
  • 43
  • 1
  • 3
0
votes
1 answer

Speed up loops in Tornado Template

Is it possible speed up loops in template using Cython, PyPy or Numba? {% for student in [p for p in people if p.student and p.age > 23] %}
  • {{ escape(student.name) }}
  • {% end %} My intent is try out if loops can made faster for template…
    user3879155
    0
    votes
    1 answer

    How to run a recent version of pypy (e.g., 2.3.1) on Heroku, Rackspace, AWS?

    I'd like to use pypy 2.3.1 as a runtime env. for a Flask app with numpy. I've tested this on Heroku, but it only support pypy v. 1.9. Has anyone had luck with running a recent v. of pypy, e.g., pypy 2.3.1, on either Heroku, Rackspace, AWS or…
    Scott
    • 39
    • 2
    0
    votes
    1 answer

    Python pypy: Efficient sum of absolute array/vector difference

    I am trying to reduce the computation time of my script,which is run with pypy. It has to calculate for a large number of lists/vectors/arrays the pairwise sums of absolute differences. The length of the input vectors is quite small, between 10 and…
    feob
    • 1,930
    • 5
    • 19
    • 31