0

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.

Aluma Gelbard
  • 43
  • 1
  • 6

4 Answers4

2

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

TRx Studio
  • 23
  • 1
  • 6
1

You probably need to bootstrap your installation of pip so that you can move along with this.

  1. Download the bootstrap script from https://bootstrap.pypa.io/get-pip.py
  2. 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.

Ian Stapleton Cordasco
  • 26,944
  • 4
  • 67
  • 72
0

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 :)

0

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

richin
  • 182
  • 1
  • 15