简体   繁体   中英

error while installing django

I am trying to learn Django framework. I have windows machine and on that I have installed virtual machine (oracle VM VirtualBox manager). I have python installed on that.

I dont see pip installed on this VM. so i tried to install django via below:

 wget https://www.djangoproject.com/download/1.10.1/tarball/

This gives the following error:

 Resolving www.djangoproject.com... 162.242.220.127,      2001:4802:7801:102:be76:4eff:fe20:789f
 Connecting to www.djangoproject.com|162.242.220.127|:443... connected.
 ERROR: cannot verify www.djangoproject.com's certificate, issued by `/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3':
 Unable to locally verify the issuer's authority.
 ERROR: certificate common name `djangoproject.com' doesn't match requested host name `www.djangoproject.com'.
 To connect to www.djangoproject.com insecurely, use `--no-check-certificate'.
 Unable to establish SSL connection
 --------------------

so i tried below:

wget --user=username --password --no-check-certificate https://www.djangoproject.com/download/1.10.1/tarball/

but still error:

ERROR: cannot verify www.djangoproject.com's certificate, issued by `/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3':
Unable to locally verify the issuer's authority.
ERROR: certificate common name `djangoproject.com' doesn't match requested host name `www.djangoproject.com'.
To connect to www.djangoproject.com insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.

Can somebody help?

Get pip installed and working and then install it using pip as suggested

Official instructions [check out instructions][1] Per http://www.pip-installer.org/en/latest/installing.html :

Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt:

python get-pip.py

pip install django

pip freeze | grep Django

      Django==1.9.9     # to see which version is installed

ps. Keep in mind, once you have pip installed, if you run pip and you still get something like "command not found" you may have to just close the shell and start it again.

why not just download from github repo

in that way this will work

wget https://github.com/django/django/archive/master.tar.gz

(I am assuming you use Ubuntu on this VM)

Just install pip with the following command:

sudo apt-get install python-pip python-dev build-essential 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM