0

I am getting

could not resolve host :bootstrap.pypa.io

error when trying to install virtualenv

I am trying to come up with a Django project, I have python 3 in my Mac and I need to use virtualenv for creating a virtual environment, I used pip install virtualenv to install virtual env but I got an error

Could not find a version that satisfies the requirement virtualenv (from versions: ) No matching distribution found for virtualenv

I found a solution for this in Stack Overflow here which was to update pip using

curl https://bootstrap.pypa.io/get-pip.py | sudo python

but I am getting

could not resolve host :bootstrap.pypa.io

error can some one suggest me what needs to be done to successfully install virtualenv.

blackbrandt
  • 2,010
  • 1
  • 15
  • 32
varun
  • 25
  • 2
  • 11
  • can you connect to https://bootstrap.pypa.io/get-pip.py in web browser ? Then download it manually and run `sudo python downloaded_script.py`. – furas Jul 03 '19 at 16:53
  • I am able to see the comments in my browser but the complete code is not available as it is in binary, i tried using wget in terminal to download the resource from web but I am getting an error – varun Jul 03 '19 at 17:15
  • you shouldn't see any comments in web browser. It should download python's script, not binary code. – furas Jul 03 '19 at 17:49
  • I see the introduction within the comments and initial code followed by the random characters – varun Jul 03 '19 at 18:03
  • all these comments and random characters (encoded in base64) is python's code which you should save in file `get-pip.py` and run it. Normally browser should save it in file. You can right click on link https://bootstrap.pypa.io/get-pip.py and use `"save as .."` (or similar) to save it. – furas Jul 03 '19 at 18:05

0 Answers0