Importing modules for pypy2.7

I have 3 python related environments:

  • base (for python3)
  • pypy3 (for pypy3)
  • pypy27 (for pypy2.7)

I have some programs that I would still like to run under pypy 2.7.

When in the pypy3 environment and I issue a
conda install sympy
it seems to install the correct thing for pypy3.

If I am in the pypy27 environment, then pypy is pypy2.7.13.

In pypy27 if I try
conda install sympy
then I get the message
# All requested packages already installed.

But if I run pypy on a program:
ImportError: No module named sympy

If I
conda list
in pypy27, I get
#sympy 1.10.1 py310hff52083_1 conda-forge

Any thoughts on how to install the pypy2.7 sympy in anaconda?

1 Like

dear doug1.

Thank you for posting.
Sympy in the Python2.7 series does not exist in the normal registry, so you need to use the old Sympy.

The following Sympy is applicable.
https://anaconda.org/mcrot/sympy
https://anaconda.org/certik/sympy

Also, importantly, you must ensure that the pypy27 environment is enabled during installation before running conda install.

Regards, you.
ktsh.tanaka.2020