0

I have installed pip3 with the command

sudo apt install python3-pip

Then i installed the paramiko package .While installing it threw a error as

 importError: No module named 'setuptools_rust'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zssfzqh_/cryptography/
You are using pip version 8.1.1, however version 21.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@demo-testvm2-f96f45965-ps4bn:/home/appadmin# ImportError: No module named 'setuptools_rust'
bash: ImportError:: command not found

Then i upgraded pip using the following command

pip3 install --upgrade pip

From this pip3 is not working it shows the following error

File "/usr/bin/pip3", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/pip/__init__.py", line 12, in main
    from pip._internal.utils.entrypoints import _wrapper
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/utils/entrypoints.py", line 4, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 58
    sys.stderr.write(f"ERROR: {exc}")
                                   ^

I have tried reinstalling pip3 and even python

still the error is not cleared

pls help .Thanks in advance

  • f-strings are a Python >= 3.6 syntax, which is why your Python 3.5 interpreter is giving a `SyntaxError`. – DeepSpace Jun 09 '21 at 12:54

1 Answers1

1

There

sys.stderr.write(f"ERROR: {exc}")

so called f-string is used, whilst

/usr/local/lib/python3.5/dist-packages/pip/__init__.py

suggest that you are using python 3.5; f-strings are available in python 3.6 and newer. Please try changing python to 3.6 or newer.

Daweo
  • 31,313
  • 3
  • 12
  • 25