1

I'm trying to install a Python v2 package (yes, EOL, I know) and when when I do a pip install bezier) I get a message that hints that the other side is in Python V3:

>> pip2 install --user bezier
Collecting bezier
  Downloading https://files.pythonhosted.org/packages/b9/0c/b1982f93c36fc06850a3880bb693bf24a047946633ca7403664836b9da9e/bezier-2020.5.19.tar.gz (313kB)
    100% |████████████████████████████████| 317kB 2.4MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qgjAbR/bezier/setup.py", line 93
        print(NUMPY_MESSAGE, file=sys.stderr)
                                 ^
    SyntaxError: invalid syntax

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

Is there a way to access the V2 packages (secret pip options or manual download+install)?

This would be for Ubuntu 19.04 and Ubuntu 16.04.

xenoid
  • 8,396
  • 3
  • 23
  • 49

1 Answers1

1

The last version supporting Python 2.7 is 0.9. So

pip install -U "bezier==0.9.0"

or

pip install -U "bezier<0.10.0"
phd
  • 82,685
  • 13
  • 120
  • 165
  • Ah, OK. Until recently I would just use `pip install` or `pip3 install` depending on target Python version and I would get the right package, so I wonder why this stopped working. – xenoid May 22 '20 at 16:01
  • 1
    It depends on the package. Some packages declare `requires_python` version but this one doesn't. – phd May 22 '20 at 16:50
  • Makes sense. Thx. – xenoid May 22 '20 at 17:07