So here is my issue. I\'ve managed to install PyPy using conda with the following command:
conda install -c conda-forge pypy3.5
Unfortunately,
Worked for me like this:
conda create -n pypy3 -c conda-forge pypy3.5
Afterwards you have to link to the pypy3 interpreter within the bin directory of the env
ln -s pypy3 python
I'm not sure what changed, but conda install pypy3 definitely doesn't work for me (Jan-2021):
conda install pypy3
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- pypy3
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Might not achieve exactly what you want, but here's what i've done:
Make a new conda env
conda create --name pypy_env
conda activate pypy_env
Install pypy3 using conda
conda install pypy3
Get Pip for pypy3 using the method here Install pip on pypy
Install packages for pypy using
pypy3 -m pip install <name_of_package>
For some packages it's eaiser to use the pre-built pypy wheel files, some you can find here https://www.lfd.uci.edu/~gohlke/pythonlibs/
Conda now supports PyPy more smoothly.
conda config --set channel_priority strict
conda create -c conda-forge -n pypy pypy
conda activate pypy
There's still a lot of work being done to build conda packages for pypy, but there's already a lot of compatibility. For example,
conda install mpmath
conda install numpy
both work now.
Reference: https://conda-forge.org/blog/posts/2020-03-10-pypy
Also note that the official recommendation for using pip with pypy is described here, the key point of which is this:
Best practices with
pip
is to always call it as<python> -mpip ...
, but if you wish to be able to callpip
directly from the command line, you must callpypy -mensurepip --default-pip
.