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

How can I use PyPy as standard/default interpreter in PyCharm 4.5.2?

How can I use PyPy as standard/default interpreter in PyCharm 4.5.2? Everything runs under Ubunutu 14.10 and pypy is already installed.
Stefan
  • 133
  • 1
  • 6
5
votes
1 answer

Counting Algorithm Performance Optimization in Pypy vs Python (Numpy vs List)

My expectation was that pypy could be as much as an order of magnitude faster than python, but the results indicate that pypy is in fact slower than expected. I have two questions: Why is pypy significantly slower with numpy? Is there anything I…
Brian Bruggeman
  • 5,008
  • 2
  • 36
  • 55
5
votes
2 answers

Calling PyPy sandbox from another language

I'll preface this by saying I am quite new to PyPy, though fairly experienced with Python. I'm looking to run a web app where I run untrusted Python code. The PyPy sandboxing features look ideal for what I'm doing. The PyPy docs on sandboxing…
jmite
  • 8,171
  • 6
  • 40
  • 81
5
votes
2 answers

when to use an alternative Python distribution?

I have been programming in Python for a few years now and have always used CPython without thinking about it. The books and documentation I have read always refer to CPython too. When does it make sense to use an alternative distribution (PyPy,…
hoju
  • 28,392
  • 37
  • 134
  • 178
5
votes
1 answer

PYPY installation for dummies - What to do with the zip file

I'm trying to use Pypy to make my code run faster, but I don't know what to do with the zip file I downloaded from the site (I tried to read the directions but it moves too fast and I don't know what's going on). I was wondering if anyone had simple…
user1998665
  • 81
  • 1
  • 5
5
votes
3 answers

What "kind" of Python to start with?

I want to learn python so I downloaded it from the python site and I saw 4 other kinds of pythons appear: Python (normal) IronPython Jython PyPy Stackless Python I can really find what the differents are between these. Also which one is the best…
user1392513
5
votes
3 answers

Speeding up Parts of Existing Python App with PyPy or Shedskin

I am looking to bring speed improvements to an existing application and I'm looking for advice on my possible options. The application is written in Python, uses wxPython, and is packaged with py2exe (I only target windows platforms). Parts of the…
misshapen
  • 328
  • 1
  • 6
4
votes
1 answer

'no version information available' warning when starting pypy on centos6

I've been struggling with this for a few hours and not sure how to get rid of it(or if it'll cause any problems for me) but I keep getting the following warnings when I start pypy on centos6: [root@domU-123 bin]# ./pypy ./pypy:…
Lostsoul
  • 25,013
  • 48
  • 144
  • 239
4
votes
1 answer

Why PyPy 1.7 desn't implement "stackless" stack?

Default build of PyPy 1.7 with stackless included in, does not offer the ability to run with no recursion depth limit (in straight way). Why? Previus builds of PyPy with stackless support continuation style of function call and tail recursion. I'm…
4
votes
1 answer

Python: PyPy: SciPy/Chi-square distribution?

I have a Python project where performance is fairly important. Honestly, I know Python (at least pure Python) isn't the best tool for the job, but I'm using it anyhow because I want to distribute a very simple pure python version of some research…
dsimcha
  • 67,514
  • 53
  • 213
  • 334
4
votes
2 answers

Can I embed CPython inside PyPy?

I'd like to write a performance-sensitive application in Python, so executing it under PyPy is a natural choice. However, a significant portion of my code depends on numpy, scipy, and scikit-learn. Would it be possible to embed a CPython instance…
Alex Rubinsteyn
  • 420
  • 4
  • 8
4
votes
1 answer

Correct way to use venv and pip in pypy

I've been using cpython forever, but I'm new to pypy. In cpython, this is how I use virtual environments and pip. python3 -m venv venv source venv/bin/activate python3 -m pip install I recently started using pypy for a project, and…
4
votes
4 answers

PYPY venv pip ERROR: ModuleNotFoundError: No module named 'pip._vendor.six'

I created venv according to pypy install site: System-Product-Name:~# virtualenv -p "/home/x/pypy3.8-v7.3.7-linux64/bin/pypy" ve created virtual environment PyPy3.8.12.final.0-64 in 102ms Success. Following step 2 (activation) worked as well...…
t_k
  • 121
  • 2
  • 8
4
votes
0 answers

Pip install fails because of a build dependency Python 2.7 incompatibility

I'm trying to build my legacy project with the pypy-2.7-buster Docker image. Some requirements need to be built in the install process inside the container. Problem arises when one of my dependencies needs setuptools to build itself, their specified…
4
votes
2 answers

CPython and PyPy Decimal operation performance

I would like to run some 100k+ simulations with some millions of data points, which are represented as decimals. I choose decimals over floats for floating point accuracy and ease of unit testing my logic (since 0.1 + 0.1 + 0.1 does not equal 0.3…
user10370644