0

When I try to install this, I get this error; what is the solution?

ubuntu@ip-xxx-xxx-xxx-xxx:~/URLuploader-With-Hotstar$ pip3 install -r requirements.txt
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 14, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 23, in <module>
    from pip.locations import (
  File "/usr/lib/python3/dist-packages/pip/locations.py", line 9, in <module>
    from distutils import sysconfig
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.8/distutils/__init__.py)
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255

2 Answers2

1

Seems you're missing python3-distutils package, install via:

sudo apt install python3-distutils

See also:

pLumo
  • 22,565
1

You need to install python3.8-distutils the suitable package to your python version (python3.8):

sudo apt install python3.8-distutils

Switch to python3.8 following this answer.

Reinstall pip3:

sudo apt remove python3-pip
cd /tmp
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.8 get-pip.py
pip3 install pyrogram
GAD3R
  • 66,769