Error when trying to pip install

Issue #582 duplicate
Leonardo Filgueira created an issue

I'm running pip install rpy2 on a Debian GNU/Linux 10 (buster) and I get this error:

Collecting rpy2
  Using cached https://files.pythonhosted.org/packages/85/a3/4948c12c3701b47410ea1bb27508737983d61255fb291a51cebca6460fc8/rpy2-3.1.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-svYM0M/rpy2/setup.py", line 166
        [f'{pack_name}.{x}'
                          ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-svYM0M/rpy2/

Comments (2)

  1. Laurent Gautier

    This is because rpy2 is only compatible with Python 3. setup.py is meant to report an informative error message if trying to install for Python2, but setup.py was accidentally made incompatible with Python 2 (which defeats the purpose).

  2. Log in to comment