簡體   English   中英

pip安裝Django

[英]pip install Django

我正在嘗試在Linux服務器上安裝Django。 我已經成功安裝了Python和pip,但是當我運行該pip install Django時遇到了SSL錯誤。

pip install Django

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting Django
  Could not fetch URL https://pypi.python.org/simple/django/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not find a version that satisfies the requirement Django (from versions: )
No matching distribution found for Django

如果您使用的是python 3或更高版本

sudo apt-get install python3-setuptools ca-certificates

然后使用

pip3 install django

如果您使用的是python2 python-openssl和python3-openssl,請嘗試安裝ssl模塊。 如果這樣不起作用,請嘗試升級pip版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM