Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install PyPy in anaconda

Tags:

I have a Linux-64 bit machine. How do I install PyPy in my anaconda environment. I tried conda install pypy. It says there are no available packages. pip install pypy also returns a similar message. Is it that the only way to install PyPy is by downloading the tar.gz file from the website? Once installed, how do I configure my Anaconda environment in such a way so as to be able to switch from PyPy to other Python implementations when required?

like image 649
Menezes Sousa Avatar asked Mar 15 '15 03:03

Menezes Sousa


People also ask

How do you use PyPy in Python?

For Python 2.7, it's just called pypy . For CPython, if you would like to run Python 3 from the terminal, you simply enter the command python3 . To run PyPy, simply issue the command pypy3 . Entering the pypy3 command in the terminal might return the Command 'pypy3' not found message, as shown in the next figure.

Does PyPy support Python 3?

PyPy comes in two versions: one is fully compatible with Python 2.7; the other is fully compatible with one 3. x version.


1 Answers

conda-forge now supports PyPy3.6 as the python interpreter in a conda environment (see the official blog post):

conda config --set channel_priority strict conda create -n pypy pypy conda activate pypy 

And then use it like your regular python executable (notice that this is a different Python interpreter, not a package)

pypy3 -c "import sys; print(sys.version)"

It works on Linux and OSX.

like image 132
Ohad Avatar answered Nov 03 '22 16:11

Ohad