Python(우분투)의 문제점

Python(우분투)의 문제점

이 프로그램을 설치하려고 하면 이런 오류가 발생합니다. 해결 방법은 무엇입니까?

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)

답변1

패키지가 누락된 것 같습니다 python3-distutils. 다음을 통해 설치하세요.

sudo apt install python3-distutils

또한보십시오:

답변2

Python 버전( ) python3.8-distutils에 적합한 패키지를 설치 해야 합니다 .python3.8

sudo apt install python3.8-distutils

Python3.8로 전환이 답변을 따르십시오.

다시 설치 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

관련 정보