python显示安装失败_关于python:安装失败并显示Requirements.txt,但可用于pip安装...
與使用pip直接安裝時相比,在使用requirements.txt時出現一些奇怪的行為。 希望您能對此有所了解。
這可能與未解決的問題相同:pip install -r requirements.txt在scipy上失敗,但在逐行手動運行時有效
Python 2.7.6
Django 1.6.11
當我像這樣使用requirements.txt安裝mailchimp3時:
sudo /usr/local/python/django/bin/pip install -r config/myvr/requirements.txt
安裝失敗,我看到:
Collecting mailchimp3==2.0.3 (from -r config/myvr/requirements.txt (line 73))
2016-12-21 11:23:22,286 [salt.loaded.int.module.cmdmod][ERROR ][1759] stderr: /usr/local/python/django/local/lib/python2.7/site-packages/pip/req/req_f
ile.py:129: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options, opts)
/usr/local/python/django/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLCon
text object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more informati
on, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Could not find a version that satisfies the requirement mailchimp3==2.0.3 (from -r config/myvr/requirements.txt (line 73)) (from versions: )
No matching distribution found for mailchimp3==2.0.3 (from -r config/myvr/requirements.txt (line 73))
2016-12-21 11:23:22,286 [salt.loaded.int.module.cmdmod][ERROR ][1759] retcode: 1
但是,當我像這樣直接安裝時:
sudo /usr/local/python/django/bin/pip install mailchimp3==2.0.3
安裝成功:
(django)ubuntu@dev:~/myvr$ sudo /usr/local/python/django/bin/pip install mailchimp3==2.0.3
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting mailchimp3==2.0.3
/usr/local/python/django/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/python/django/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading mailchimp3-2.0.3-py2.py3-none-any.whl (83kB)
100% |████████████████████████████████| 92kB 413kB/s
Requirement already satisfied: requests in /usr/local/python/django/lib/python2.7/site-packages (from mailchimp3==2.0.3)
Installing collected packages: mailchimp3
Successfully installed mailchimp3-2.0.3
(django)ubuntu@dev:~/myvr$
必須使用需求文件安裝此文件,而不能直接在我們的生產環境中安裝。 您是否有機會知道這里發生了什么?
您還需要其他信息嗎?
您可以發布您的requirements.txt文件以及您正在使用的pip版本嗎?
問題是,在requirements.txt文件中,有一個lxml依賴項,并且該依賴項設置為無需線程即可安裝,因此看起來像這樣
lxml==3.5.0 --install-option='--without-threading'
任何時候--install-option(或--build-options或--global-options)通過時,都會禁止使用滾輪。
如果是mailchimp3,則需要正確安裝輪子。
我們的解決方案是將lxml的安裝移至單獨的構建步驟。
無法閱讀錯誤消息,但是您可以檢查您的requirements.txt是否包含依賴于同一文件中列出的軟件包的軟件包。 假設req文件包含pack1和pack2,如果稍后調用pack1 import pack2和pack2,則安裝將失敗。 我有問題,這是github上的類似問題
總結
以上是生活随笔為你收集整理的python显示安装失败_关于python:安装失败并显示Requirements.txt,但可用于pip安装...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python写表格_python写入表格
- 下一篇: 光盘刻录只允许读取不能拷贝_便携易用,读