python version 2.7
Error
This error occurs when using pip
Traceback (most recent call last):
File “C:\Python27\Scripts\pip-script.py”, line 9, in
load_entry_point(‘pip==21.1.3’, ‘console_scripts’, ‘pip’)()
File “C:\Python27\lib\site-packages\pkg_resources_init_.py”, line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “C:\Python27\lib\site-packages\pkg_resources_init_.py”, line 2569, in load_entry_point
return ep.load()
File “C:\Python27\lib\site-packages\pkg_resources_init_.py”, line 2229, in load
return self.resolve()
File “C:\Python27\lib\site-packages\pkg_resources_init_.py”, line 2235, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “C:\Python27\lib\site-packages\pip_init_.py”, line 1, in
from typing import List, Optional
ImportError: No module named typing
The solution is to update python to 3, but I want to use 2.7, so this method does not work
Solution
I found that the version of pip is too high, and it is not compatible with python2, my version is pip21.1.3, so I need to set back the version of pip, the solution is as follows, just run it in order
curl -O https://bootstrap.pypa.io/pip/2.7/get-pip.py
python get-pip.py
python -m pip install --upgrade "pip < 21.0"
Perfect solution, PIP version back, install again without error correction
Read More:
- OSError libespeak.so.1 error: no such file or directory [How to Solve]
- [Solved] ansible Command Error: Error -5 while decompressing data: incomplete or truncated stream
- How to Solve Python Importerror: DLL load failed: unable to find the specified program using tensorflow
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie
- Python installs virtualenv through PIP and always reports an error: response.py“, line 438, in _error_catcher yield
- bandersnatch Error: No module Named [How to Solve]
- Django Issues: TypeError: “Settings” object is irreversible
- [Solved] AttributeError: module ‘logging‘ has no attribute ‘Handler‘
- Keras import package error: importerror: cannot import name ‘get_ config‘
- [Solved] Selenium.common.exceptions.WebDriverException: Message: newSession
- [Solved] RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at
- Gunicorn Flask Error: [ERROR] Socket error processing request
- [Solved] ValueError: check_hostname requires server_hostname
- [Solved] Pdfplumber Read PDF Sheet Error: AttributeError: function/symbol ‘ARC4_stream_init‘ not found in library
- Import win32API; importerror: DLL load failed: the specified program was not found
- [Mac Pro M1] Python3.9 import cv2 Error: Reason: image not found
- How to Solve Python ImportError: cannot import name UnrewindableBodyError
- [Solved] RuntimeError: ProcessGroupNCCL is only supported with GPUs, no GPUs found
- [Solved] AttributeError: ‘Manager‘ object has no attribute ‘get_by_natural_key‘
- Mac Upgrade pip Error OSError: [Errno 13] Permission denied: ‘/Library/Python/2.7/site-packages/pip-9.0.1-py2….