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
Filter by
Sorted by
Tagged with
4 votes
0 answers
2k views

How can I make Celery use pypy as its interpreter?

I've just installed pypy on my system (Ubuntu 14.04, pypy installed from official PPA). My default interpreter is still CPython 2.7 (latest), so executing any celery commands will run under this ...
Louis Thibault's user avatar
3 votes
4 answers
6k views

lxml won't install under pypy using easy_install

When doing: $ sudo pypy -m easy_install lxml The response is: Searching for lxml [...snip...] ERROR: /bin/sh: 1: xslt-config: not found ** make sure the development packages of libxml2 and ...
sssilver's user avatar
  • 2,669
3 votes
2 answers
1k views

I am using pypyodbc.connect - Is there a way to give it an appname?

In _mssql.connect, there is an option to add appname. I'm wondering if pypyodbc.connect has something similar. Thank you.
user1327390's user avatar
3 votes
1 answer
3k views

PyPy memory usage increasing over time

I've noticed some oddities in the memory usage of my program running under PyPy and Python. Under PyPy the program uses not only a substantially larger initial amount of memory than CPython, but this ...
Stuart Lacy's user avatar
  • 1,993
3 votes
3 answers
3k views

How to install twisted 10.2.0 with pypy 1.4.1?

I can't install twisted 10.2.0 to my ubuntu box. After download twisted source I issue the command: pypy setup.py install. After that I receive the error: building 'twisted.runner.portmap' extension ...
hailegia's user avatar
3 votes
1 answer
1k views

Couldn't find program: 'pypy' on Google Colab. Solution or alternatives?

I'm getting this error in a google colab notebook. Do I need to install something or it's just not possible to use pypy inside colab? I've tried this simple script: %%pypy print("hello") # Couldn't ...
valerioneri's user avatar
3 votes
2 answers
3k views

NumPyPy vs Theano?

I am wondering: do these two projects basically have the same goal -- to speed up numerical work in Python? What are the similarities and differences? I know that Theano does not aim to re-implement ...
John Thompson's user avatar
3 votes
3 answers
3k views

Are bytes always octets in Python?

Could there be a Python implementation where the assertion fails: assert all(byte in range(256) for byte in any_bytes_object) # Python 3 semantics assert all(byte in range(256) for byte in map(ord, ...
jfs's user avatar
  • 408k
3 votes
2 answers
659 views

Is fstat() a safe (sandboxed) operation?

I'm currently writing a Python sandbox using sandboxed PyPy. Basically, the sandbox works by providing a "controller" that maps system library calls to a specified function instead. After following ...
nickname's user avatar
  • 1,187
3 votes
2 answers
3k views

PyPy: "ImportError: No module named xlrd"

I am using PyPy 2.2.1 on Ubuntu 14.04. I want to use the xlrd module for my program but running the programming with pypy throws me an import error. How do I fix this?
Banach Tarski's user avatar
3 votes
2 answers
111 views

Pypy specific error

I have the following code: #!/usr/bin/env python #!/usr/bin/env pypy class my_components(object): COMP0 = 0 COMP1 = 1 COMP1 = 2 __IGNORECOMP = -1 def attribute_dictionary(o): d =...
vkontori's user avatar
  • 1,205
3 votes
2 answers
847 views

How can I annotate a class in pypy?

I am using pypy to translate some python script to C language. Say that I have a python class like this: class A: def __init__(self): self.a = 0 def func(self): pass I ...
huangcd's user avatar
  • 2,399
3 votes
1 answer
692 views

Installed numpy for pypy but get " TypeError: readonly attribute '__module__' "

I've installed numpy in the recommended way for PyPy 6.0: ./pypy -m ensurepip ./pip install -U pip wheel ./pypy -m pip install numpy However, this does not work (on Ubuntu 16.04): this installation ...
jwimberley's user avatar
  • 1,738
3 votes
1 answer
2k views

What are my options to speed up and reduce the size of my kivy android application

I am wondering what options I have to speed up kivy after I package it. I was looking into cython and pypy because those should speed up python. Also, I was reading that kivy can be a little slower ...
NeuroticHamster's user avatar
3 votes
1 answer
2k views

Am I using PyPy wrong? It's slower 10x than standard Python

I have heard good stuff about PyPy. In particular I'd heard that it was very fast which made me wonder if it might be usable for an embedded project I have. I downloaded PyPy-2.6 for my Windows 7 PC, ...
James's user avatar
  • 4,057
3 votes
1 answer
3k views

Running Scrapy on PyPy

Is it possible to run Scrapy on PyPy? I've looked through the documentation and the github project, but the only place where PyPy is mentioned is that there were some unit tests being executed on PyPy ...
alecxe's user avatar
  • 469k
3 votes
1 answer
362 views

What argument(s) to translate pypy3 am I missing?

Trying to translate pypy3 on Ubuntu 14.04. I've followed the instructions here: http://pypy.readthedocs.org/en/latest/getting-started-python.html#installation, but I am getting an error. pypy ../../...
user3817118's user avatar
3 votes
1 answer
1k views

PyPy Sandbox: Cannot import rpython module

I'm trying to use PyPy to create a server-side sandbox with limited access to my file system. I am working on Ubuntu 12.04 64 bit machine and have been trying to install the full source code for PyPy ...
Alok Saxena's user avatar
3 votes
1 answer
1k views

Calling Python from Ruby - PyPy compatibility

I'm looking to call Python code from Ruby. There are a few existing tools to do this and a few questions on this site recommending http://rubypython.rubyforge.org/, which works by embedding the Python ...
jclancy's user avatar
  • 51.1k
3 votes
1 answer
2k views

Is it possible to use the PyPy interpreter in Spyder on Windows 10?

I'm looking to run pypy using spyder on Windows 10. I'm not sure if this is possible or even makes sense to do, but I'm used to using spyder to run python programs so I wanted to also use it to run ...
CSforStructuralEngineer's user avatar
3 votes
2 answers
857 views

pip install with ensurepip on PyPy3.5 v5.10 in Windows 7 x64

Why I can't install pip with pypy3 -m ensurepip? I have unpacked PyPy from official package, and followed instructions at official docs but resulting in an error. Interpreter log is below. Traceback (...
green's user avatar
  • 335
3 votes
1 answer
1k views

Any big projects using Pypy? [closed]

I have a very large heterogeneous Python codebase that uses Django as the front-end. This codebase is deployed alongside several servers that are beginning to show the strain and we're looking for ...
ruipacheco's user avatar
  • 15.8k
3 votes
1 answer
797 views

Python - How can this return -1?

Should it be possible for this method to return -1? def tree_value(self, team, x, y): if team == NO_TEAM or self.team_sees_tree[team, x, y]: return int(self.tree[x, y]) else: ...
whats canasta's user avatar
3 votes
2 answers
3k views

Using PyPy as an Interpreter with PyCharm

Overview: I have a project with two existing Virtualenv environments. One uses CPython 3.7 and one uses CPython 3.8. I want to add another interpreter that uses PyPy. Currently, I have Python 3.8 ...
wingedNorthropi's user avatar
3 votes
1 answer
1k views

Difference Between Python2, Python3, PyPy2, PyPy3

I am just wondering what the difference is between Python2, Python3, PyPy2, PyPy3 is. I already understand that Python3 is the latest version of python, however I have no clue as to what PyPy2 and ...
Lunar's user avatar
  • 106
3 votes
2 answers
5k views

Problem installing numpy for PyPy3 on Windows 10

I am having issues trying to install numpy for pypy3 on my Windows 10 machine. As I am unable to tell if this problem stems from my pypy3 installation or from something else I am describing here all ...
solub's user avatar
  • 1,321
3 votes
1 answer
956 views

Use extern "Python" style cffi callbacks with embedded PyPy

Can PyPy be embedded use the new extern "Python" style cffi callbacks? PyPy's documentation only shows the old style cffi callbacks but the cffi documentation suggests against using them. The PyPy ...
Praxeolitic's user avatar
  • 23.2k
3 votes
1 answer
955 views

Pypy 3.2 Pillow Issue

I'm on Ubuntu Server 14.04. I'm trying to use pypy 3.2 to run a django application. But whenever I try pypy3 manage.py runserver 0:8000, it says: (fields.E210) Cannot use ImageField because Pillow ...
Renato Oliveira's user avatar
3 votes
1 answer
1k views

How can I get the stable version of numpy for PyPy?

I've downloaded PyPy portable version from the link https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-src.tar.bz2 and I've installed numpy for PyPy with the command pip install git+https://...
Toby Seo's user avatar
  • 497
3 votes
1 answer
1k views

Is it possible to use numpy in a pypy sandbox and write out to files?

I'd like to be able to run untrusted python scripts to generate and save images using numpy and matplotlib. Is that possible? So: Can I import numpy and matplotlib when running in a pypy sandbox? I ...
Ethan's user avatar
  • 255
3 votes
1 answer
269 views

Comparing unicode in pytest under pypy fails on first run

The SoCo project has a small test suite in which one test fails under pypy only on the first run (when no pyc file exists). Subsequent runs succeed. When running the test for the first time, the ...
Stefan Kögl's user avatar
  • 4,543
3 votes
1 answer
1k views

PyPy and efficient arrays

My project currently uses NumPy, only for memory-efficient arrays (of bool_, uint8, uint16, uint32). I'd like to get it running on PyPy which doesn't support NumPy. (failed to install it, at any rate)...
peu ping's user avatar
  • 399
3 votes
1 answer
717 views

Django (or other pip package) in PyPy

I am attempting to get django working using pypy. I have everything setup and working great under python2.7 and python3.2 is not installed. I then installed pypy and attempted to run django: ...
tgrosinger's user avatar
  • 2,509
3 votes
2 answers
332 views

What front-end can I use with RPython to implement a language?

I've looked high and low for examples of implementing a language using the RPython toolchain, but the only one I've been able to find so far is this one in which the author writes a simple BF ...
zslayton's user avatar
  • 52.2k
3 votes
1 answer
1k views

PyPy C/API access

I've been looking through the reference docs and can't find any mention of a C API for PyPy. Does it exist? If so is it the same as the CPython C API? If PyPy was run on top of CPython would it change ...
Jim Jeffries's user avatar
  • 9,961
3 votes
1 answer
538 views

Making PyPy work with any version of Python (>2.5)?

I want to use PyPy with Python 2.6. The default version (PyPy 1.4.1) seems to be 2.5 when downloading binaries. Google doesn't seem to be helping much, advice?
ComputationalSocialScience's user avatar
3 votes
2 answers
119 views

How does the dynamic nature of Python interoperate with PyPy's ability to inline functions?

Suppose you have a function like f that calls a function m.g: def f(x): return m.g(x, 2*x, x+1) and f gets called a lot, so PyPy JITs it and inlines m.g into it. What if later, due to the "...
MWB's user avatar
  • 12k
3 votes
1 answer
1k views

Run a Django app on PyPy on Amazon AWS

I have a Django application, that does some intensive computational tasks. To make its execution faster I run it with PyPy (the Python alternative extension to run scripts faster). I have to deploy ...
Muhammad Sadiq Alvi's user avatar
3 votes
1 answer
716 views

Remove pypy completely from Windows 7

I want to uninstall pypy version on window 7 which is compatible to Python 2.7 version. There is no pypy in "Uninstall program" from Control Panel. I have not found any documentation so far.
Mira's user avatar
  • 131
3 votes
1 answer
178 views

Idiomatic way to process lists and dicts

Recently I've been discovering "the Python way" of processing lists, dicts, sets, etc. To this extent I've modified my function to calculate the first N prime numbers, let's call it the 'Pure Dict' ...
Arijan's user avatar
  • 163
3 votes
2 answers
107 views

Why is pypy's clock() so imprecise?

I tried timing some of my code and noticed some really weird results with pypy. Look at this example: from time import clock from random import randint times = [] for _ in range(10): start = clock(...
Undeterminant's user avatar
3 votes
1 answer
234 views

PyPy: get raw access to string

In CPython, this works: import ctypes ctypes.pythonapi.PyString_AsString.argtypes = (ctypes.c_void_p,) ctypes.pythonapi.PyString_AsString.restype = ctypes.POINTER(ctypes.c_char) s = "abc" cs = ...
Albert's user avatar
  • 66.7k
3 votes
1 answer
665 views

Installing Pygame in PyPy via a Mac

I tried installing Pygame version 1.9.1release for PyPy on my Mac OSX Lion. I ran pypy config.py first with pypy setup.py install. I added the config to the installation process since I saw that it ...
jakebird451's user avatar
  • 2,318
3 votes
1 answer
542 views

Performance of sorted() and heapq functions in Python3

I want to implement the following procedure in the fastest way using Python3: given a list of N random integers I need to return the K smallest ones (and I do not need the returned integers to be ...
Sirion's user avatar
  • 854
3 votes
1 answer
221 views

Python equivalent fo hive NumericHistogram

I have a python(to be more specific -- pypy compatible) code. I have to use histograms in it, which should be very similar if not exactly same as this java histogram implementation in Hive project. ...
PHcoDer's user avatar
  • 1,186
3 votes
1 answer
83 views

pypy: elementtree tag name only preserves first letter?

I am new to pypy and wanted to check out whether it can speed up my applicaiton. Pypy documentation says that pypy supports standard python libraries with minor exceptions. The problem I faced a ...
glexey's user avatar
  • 811
3 votes
1 answer
739 views

No module named sympy in pypy task

I tried to use pypy to accelerate python task pypy .....py and I received the following error message from sympy.combinatorics import Permutation, PermutationGroup ImportError: No module named ...
user26143's user avatar
  • 177
3 votes
1 answer
889 views

bincount in Numpypy

I have a project that makes a heavy use of the Numpy function bincount. Now I would like to use pypy to increment the performance. Unfortunately as reported in the numpypy status page there is still ...
blueSurfer's user avatar
  • 5,761
3 votes
0 answers
743 views

Why is PyPy (without JIT) slower than CPython

recently i'm doing some performance tests with PyPy (Compared to CPython) I use the nested loop matrix multiplication from this site: https://www.programiz.com/python-programming/examples/multiply-...
Progga's user avatar
  • 343
3 votes
1 answer
637 views

Can not make Tensorflow work with pypy3 and conda. Invalid ELF

I want to try tensorflow inside pypy. I tried a few days and no luck. Following is the detail. I am using UBuntu 18.04. I install conda. I install pypy through conda, conda install -c conda-forge ...
Joseph Wu's user avatar

1
3 4
5
6 7
17