'urllib3' Module not found when import 'requests' - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: 'urllib3' Module not found when import 'requests' (/thread-31846.html) |
'urllib3' Module not found when import 'requests' - spanz - Jan-06-2021 Hello guys :) I'm using python 3.9 on linux(ParrotOS). While practicing python, I installed and imported 'requests' module. When I'm trying to use it, I get this error msg: I tried to pip3 install this 'urllib3' but it is already installed..Quote:pip3 install urllib3 I will appreciate some help here, Thanks! RE: 'urllib3' Module not found when import 'requests' - snippsat - Jan-06-2021 You should not have a requests folder under root python 3.9.Rename or remove it as when import requests it will try to read from it. If you do pip show requests so should the last destination folder always be site-packages or dist-packages (a Debian-specific convention).
RE: 'urllib3' Module not found when import 'requests' - spanz - Jan-06-2021 (Jan-06-2021, 02:31 PM)snippsat Wrote: You should not have a Thanks for the reply. I renamed the folder, and now the error is: when I try to install it, it is already installed:Quote:$pip3 install requests RE: 'urllib3' Module not found when import 'requests' - snippsat - Jan-06-2021 As you use Pycharm look at Configure a Python interpreter and point it to /usr/local/lib/python3.9 .Also teste from command like type python or python3 and see that Python 3.9 interactive mode start and see that import work there.
RE: 'urllib3' Module not found when import 'requests' - spanz - Jan-06-2021 (Jan-06-2021, 03:19 PM)snippsat Wrote: As you use Pycharm look at Configure a Python interpreter and point it to /usr/local/lib/python3.9 is a folder, I couldnt set it as an interpreter. And there is nothing in this folder but 'dist-packages' folder. RE: 'urllib3' Module not found when import 'requests' - snippsat - Jan-06-2021 (Jan-06-2021, 05:34 PM)spanz Wrote: usr/local/lib/python3.9 is a folder, I couldnt set it as an interpreter.Looking at link i,so most point to the binary when choose target interpreter then is /usr/local/lib/python3.9/python I do not use PyCharm myself. |