Reputation: 43
Everytime I use pip command the command failed with error: "ImportError: No module named 'urllib3'". I do got urllib3 installed, and when I'm trying to install urllib3 again I got the same error. What can I do?
I'm using windows 10.
I cant run "pip install virtualenv", I got the same error with any pip command.
Upvotes: 0
Views: 7216
Reputation: 182
I solved this issue by deinstalling python and reinstall it.
Then you can run
python -m pip install --upgrade pip
to get the latest version of pip
Upvotes: 0
Reputation: 33
May be worth double checking your PYTHONPATH Environment Variable in: Control Panel\System and Security\System -> Advanced System Settings -> Environment Variables. I had a rogue copy of Python that caused this exact error
Upvotes: 2
Reputation: 28845
You probably need to bootstrap your installation of pip so that you can move along with this.
Using whatever version of Python you wish, run it, e.g.,
C:\\Python35.exe get-pip.py
After that finishes you should be able to pip install whatever you'd like.
Upvotes: 1
Reputation: 66
For escaping this error try to install virtualenv through "pip install virtualenv" and create the virtual environment directory using "python3 -m venv myvenv" which will create a myvenv named folder now activate the myvenv folder using "source \myvenv\bin\activate" now you have your virtual environment setup now you can install whatever you want under the venv , which will not conflict with your base os installed programs try some googling to explore pic virtualenv setup and use. happy coding :)
Upvotes: 0