LMSouq
general-dev Open

pip3 install not working - No module named 'pip._vendor.pkg_resources'

YA
YamiOmar88
1 month ago
3 views
Problem Description
When trying to install a package for Python 3 (in Ubuntu), using `pip3 install packageName` (or `sudo pip3 install packageName`), I get the following error message: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored __import__(vendored_name, globals(), locals(), level=0) ImportError: No module named 'pip._vendor.pkg_resources' I have been reading for days and have tried the following WITHOUT any success: 1. Un-installing and re-installing pip3 using the following code: `sudo apt-get remove python3-pip` followed by `sudo apt-get install python3-pip`. This was suggested in several posts that say that sometimes `pip3` doesn't install properly for Ubuntu. However, it didn't work. 2. Other post suggested it was an `ssl` package problem and that if the `ssl` package doesn't load on Python3, that's the issue. However the following command does not raise any error: `python3 -c "import ssl"`. 3. Some other post suggested the problem was with the `requests` package. I then tried `sudo apt-get remove python3-requests` followed by `sudo apt-get install python3-requests` also to no avail. Other information you may need: - `pip3 --version` gives me the same error reported above. - `dpkg -L python3-pip` gives me the following information: /. /usr /usr/lib /usr/lib/python3 /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages/pip-8.1.1.egg-info /usr/lib/python3/dist-packages/pip-8.1.1.egg-info/PKG-INFO /usr/lib/python3/dist-packages/pip-8.1.1.egg-info/dependency_links.txt /usr/lib/python3/dist-packages/pip-8.1.1.egg-info/not-zip-safe /usr/lib/python3/dist-packages/pip-8.1.1.egg-info/requires.txt /usr/lib/python3/dist-packages/pip-8.1.1.egg-info/entry_points.txt /usr/lib/python3/dist-packages/pip-8.1.1.egg-info/top_level.txt /usr/lib/python3/dist-packages/pip /usr/lib/python3/dist-packages/pip/baseparser.py /usr/lib/python3/dist-packages/pip/__main__.py /usr/lib/python3/dist-packages/pip/req /usr/lib/python3/dist-packages/pip/req/req_set.py /usr/lib/python3/dist-packages/pip/req/req_install.py /usr/lib/python3/dist-packages/pip/req/__init__.py /usr/lib/python3/dist-packages/pip/req/req_file.py /usr/lib/python3/dist-packages/pip/req/req_uninstall.py /usr/lib/python3/dist-packages/pip/index.py /usr/lib/python3/dist-packages/pip/status_codes.py /usr/lib/python3/dist-packages/pip/utils /usr/lib/python3/dist-packages/pip/utils/setuptools_build.py /usr/lib/python3/dist-packages/pip/utils/appdirs.py /usr/lib/python3/dist-packages/pip/utils/outdated.py /usr/lib/python3/dist-packages/pip/utils/ui.py /usr/lib/python3/dist-packages/pip/utils/logging.p...

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base