urllib3 is imported in python 3. However, you may find module ‘urllib3’ has no attribute ‘PoolManager’ error. In this tutorial, we will introduce how to fix this problem.
This error looks like:
Preliminary
We are using python 3.5 (py3.5) environment in anaconda.
Check poolmanager.py in python 3.5 or not
In order to fix this error, we will find there exists poolmanager.py in python 3.5 or not.
The resul is:
We only find poolmanager.py in python 3.7 and 3.8. There is not a poolmanager.py in python 3.5 and 3.6, which means this error will also be found in python 3.6.
Uninstall urllib3 in python 3.5
We first activate python 3.5 environment.
conda activate py3.5
To make poolmanager.py in python 3.5, we first use pip to uninstall urllib3
pip uninstall urllib3
Install urllib3 in python 3.5
We use pip to install urllib3.
pip install urllib3
Then you will find it is installed.
Meanwhile, we will find poolmanager.py is in python 3.5.
Runn your python code, you will find this error is fixed.