при выполнении команды
pip install -r requirements.txt
выдает такую ошибку
File "/usr/bin/pip", line 9, in <module>
from pip._internal import main
File "/usr/lib/python3/dist-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 17, in <module>
from pip._internal.locations import USER_CACHE_DIR, src_prefix
File "/usr/lib/python3/dist-packages/pip/_internal/locations.py", line 10, in <module>
from distutils import sysconfig as distutils_sysconfig
ImportError: cannot import name 'sysconfig'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip._internal import main
File "/usr/lib/python3/dist-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 17, in <module>
from pip._internal.locations import USER_CACHE_DIR, src_prefix
File "/usr/lib/python3/dist-packages/pip/_internal/locations.py", line 10, in <module>
from distutils import sysconfig as distutils_sysconfig
ImportError: cannot import name 'sysconfig'
даже когда обновляю по одному pip install attrs возникает таже ошибка можете подсказать почему и что с ней делать?