Search code examples
pythonpandaslinuxpipupgrade

when I write pip upgrade command It's being repeated error


OS : Centos7 Python version : Python 2.7.5

The command is writing in terminal

When I write command

$ pip install biopandas

The result is

Collecting biopandas
  Using cached https://files.pythonhosted.org/packages/7e/53/801b766034474df742f523a5b5aed4ac4e098e739ad18d7f6475d2a63e70/biopandas-0.4.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages (from biopandas)
Collecting numpy>=1.16.2 (from biopandas)
  Using cached https://files.pythonhosted.org/packages/0a/88/f4f0c7a982efdf7bf22f283acf6009b29a9cc5835b684a49f8d3a4adb22f/numpy-1.23.3.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-build-wcevp3/numpy/setup.py", line 64
        raise RuntimeError(f'Cannot parse version {FULLVERSION}')
                                                               ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wcevp3/numpy/
You are using pip version 8.1.2, however version 22.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

And then I write command to resolve error

$ pip install --upgrade pip

result

Collecting pip
  Using cached https://files.pythonhosted.org/packages/4b/30/e15b806597e67057e07a5acdc135216ccbf76a5f1681a324533b61066b0b/pip-22.2.2.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-build-uR1vhJ/pip/setup.py", line 7
        def read(rel_path: str) -> str:
                         ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-uR1vhJ/pip/
You are using pip version 8.1.2, however version 22.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

How can I do? sorry for my english :(


Solution

  • I think you should uninstall setup tools by

    pip uninstall setuptools
    

    then again install by

    pip install setuptools