Я недавно пытался обновить мой python 3.6 до pyhon 3.7, следуя инструкции здесь:
https://askubuntu.com/questions/1086649/how-to-update-python-to-the-latest-version-on-ubuntu-18-04
Теперь я пытаюсь установить pip для python 3.7
python3.7 -m pip install pip
Я получаю сообщение об ошибке:
OFPEPFE
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 22, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 61, in <module>
sys.path[:] = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path
AttributeError: module 'glob' has no attribute 'glob'
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 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.7/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.7/http/client.py", line 71, in <module>
import email.parser
ModuleNotFoundError: No module named 'email.parser'; 'email' is not a package
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 22, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 61, in <module>
sys.path[:] = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path
AttributeError: module 'glob' has no attribute 'glob'
Как это исправить?