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
5
votes
1 answer

what are the differences among mambaforge, mambaforge-pypy3, miniforge, miniforge-pypy3

there have been explanations about the different between miniforge and miniconda miniforge is the community (conda-forge) driven minimalistic conda installer. Subsequent package installations come thus from conda-forge channel. miniconda is the…
wsdzbm
  • 3,096
  • 3
  • 25
  • 28
5
votes
1 answer

Using PyPy with poetry

How one can use PyPy (preferably pypy3) instead of standard python with poetry? That is, what should be stored in pyproject.toml? Are other changes necessary as well?
Dominik Filipiak
  • 1,192
  • 14
  • 26
5
votes
3 answers

cytoolz/dicttoolz.c:19:10: fatal error: Python.h: No such file or directory

cytoolz/dicttoolz.c:19:10: fatal error: Python.h: No such file or directory 19 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 …
t_k
  • 121
  • 2
  • 8
5
votes
2 answers

PyPy + PHP on a single webserver

I'm in the process of setting up a webserver from scratch, mainly for writing webapps with Python. On looking at alternatives to Apache+mod_wsgi, it appears that pypy plays very nicely indeed with pretty much everything I intend to use for my own…
Chinmay Kanchi
  • 62,729
  • 22
  • 87
  • 114
5
votes
0 answers

Installing matplotlib on Pypy (Ubuntu 20.04)

I know there is a duplicate question but it is from 2017. I am trying to pip install matplotlib in my conda: pypy3 -mpip install matplotlib This is the error I am getting - I had to truncate the log due to SO limitations. My understanding is…
redsalsa
  • 51
  • 2
5
votes
4 answers

Can't install numpy - MS Visual C++ 14.1 is required. But it is installed

I am on Windows 10 using pypy3.6-v7.3.0. I am trying to install numpy with pip install numpy, but I keep getting the error: error: Microsoft Visual C++ 14.1 is required. Get it with "Build Tools for Visual Studio":…
chrispytoes
  • 1,714
  • 1
  • 20
  • 53
5
votes
3 answers

5x5 Sliding Puzzle Fast & Low-Move Solution

I am trying to find a way to programmatically solve a 24-piece sliding puzzle in a reasonable amount of time and moves. Here is an example of the solved state in the puzzle I am describing: I have already found that the IDA* algorithm works fairly…
Bob Smith
  • 220
  • 4
  • 21
5
votes
2 answers

Cannot install scipy with pypy (g++ build error)

As of 2020, installing scipy with pypy is possible. (Is it possible to install scipy under pypy?) pypy3 -mpip install scipy However, the wheel fails with this kind of error: error: Command "g++ -pthread -DNDEBUG -O2 -fPIC…
Thomas Jalabert
  • 1,344
  • 9
  • 19
5
votes
1 answer

What happened to pypy3 under the 10**10 loop time

Simple while code @count_run_time def test_while(l: int=0) -> (int, int): y = 0 x = 0 while x < l: y += x x += 1 return x, y When i use cpython(Python 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31)) to…
Jacky Xu
  • 53
  • 2
5
votes
2 answers

Can I use other python implementation via virtualenv/virtualenvwrapper?

After a while of searching (maybe it's not enough, but I don't think I'm making progress doing that), I haven't been able to find information about compatibility of other Python implementations in virtualenv/virtualenvwrapper. By "other…
Sajuuk
  • 2,667
  • 3
  • 22
  • 34
5
votes
1 answer

Compile python into binary - pypy performance

I am looking to compile python source code into a binary. I generally use pypy for performance reasons (my application runs significantly faster using pypy). I found this answer from 2012 stating compiling pypy into binary isn't possible using any…
Matt
  • 131
  • 2
  • 3
5
votes
2 answers

Why is Pypy slower for adding numpy arrays?

To test the claims that Pypy JIT is significantly faster I wrote a simple code that repeatedly adds two arrays of size 1200x1200. My code is as follows import numpy as np import random a=np.zeros((1200, 1200), dtype=np.float32) b=np.zeros((1200,…
Anirban Dutta
  • 195
  • 2
  • 11
5
votes
2 answers

How to improve scapy performance reading large files

I have to read and parse .pcap files that are too large to load into memory. I am currently using sniff in offline mode sniff(offline=file_in, prn=customAction, store=0) with a customAction function that looks roughly like…
deltap
  • 4,176
  • 7
  • 26
  • 35
5
votes
1 answer

Use Sympy with Pypy

I have installed Python 2.7 and 3.5 on a Mac running with El Capitan. Moreover, I use the package Sympy (installed with pip) with python. I wanted to run my code with Pypy (installed with homebrew) but it seems that Pypy doesn't find Sympy and says:…
Nils
  • 53
  • 3
5
votes
2 answers

Failed to install pip for pypy on Ubuntu

I cannot install pip for pypy 4.0.1 on Ubuntu 15.10. I downloaded pypy 4.0.1 from http://pypy.org/download.html. Created a symlink for it. And used wget to download get-pip.py from https://bootstrap.pypa.io/get-pip.py. But when I ran sudo pypy…
jerry.z
  • 51
  • 1
  • 3