recherche

Maison  >  Questions et réponses  >  le corps du texte

ssl - 如何解决BAE上部署python-web发生 InsecurePlatformWarning错误而无法下载pip软件包的问题?

报错信息如下:

失败原因:编译失败
失败信息:Fix depends failed. Please check requirements.txt or package.json.

cmdoptions.check_install_build_global(options)
/home/bae/code/helios/deps/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/home/bae/code/helios/deps/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/home/bae/code/helios/deps/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
DEPRECATION: Failed to find 'django' at https://pypi.mirrors.ustc.edu.cn/simple/django/. It is suggested to upgrade your index to support normalized names as the name in /simple/{name}.
/home/bae/code/helios/deps/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Cannot fetch index base URL https://pypi.mirrors.ustc.edu.cn/simple/
/home/bae/code/helios/deps/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Could not find a version that satisfies the requirement django==1.10.3 (from -r /home/bae/run/baeng/helios/work/appid9f0jy29yct/requirements.txt (line 1)) (from versions: )
No matching distribution found for django==1.10.3 (from -r /home/bae/run/baeng/helios/work/appid9f0jy29yct/requirements.txt (line 1))

百度这个问题说要解决需要安装openssl等软件包,但是通过SSH连接服务器我没有权限无法安装,而通过requirements.txt安装又会报错,如何解决?

PHP中文网PHP中文网2810 Il y a quelques jours799

répondre à tous(1)je répondrai

  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:03:44

    Ce problème est souvent rencontré dans l'ancien Python. Il est probablement plus difficile à contrôler dans BAE. Il semble que seule la méthode d'installation Requirements.txt soit fournie.

    pip utilise la bibliothèque urllib3 lors de l'installation de modules à partir de sources https. Le module ssl avant python2.7.9 est relativement ancien et entraînera des problèmes de sécurité avec les connexions SSL [1].
    Il existe deux manières de résoudre directement ce problème :

    1. Mettre à niveau Python vers une version supérieure à 2.7.9

    2. Installer les dépendances de sécurité de urllib3【2】

      >> pip install pyopenssl ndg-httpsclient pyasn1
      

    Vous pouvez également utiliser directement la source http pour éviter ce problème, comme :

      >> pip install django==1.10.3 -i http://pypi.douban.com/simple
    

    【1】https://urllib3.readthedocs.i...
    【2】https://urllib3.readthedocs.i...

    répondre
    0
  • Annulerrépondre