簡體   English   中英

如何在Amazon Elastic Beanstalk上安裝opencv-python

[英]How to install opencv-python on Amazon Elastic Beanstalk

我一直在本地開發Python應用程序,現在想將它部署到Amazon Elastic Beanstalk,但是我遇到了以下錯誤:

Downloading/unpacking opencv-python==2.4.8.1 (from -r
/opt/python/ondeck/app/requirements.txt (line 12))  
Could not find any downloads that satisfy the requirement opencv-python==2.4.8.1
(from -r /opt/python/ondeck/app/requirements.txt (line 12))

Some externally hosted files were ignored (use --allow-external opencv-python to allow). 
Cleaning up... No distributions at all found for opencv-python==2.4.8.1 
(from -r /opt/python/ondeck/app/requirements.txt (line 12))

如果我用SSH連接並輸入sudo pip install opencv-python它會說“下載/解壓縮opencv-python”一分鍾左右,那么:

Could not find any downloads that satisfy the requirement opencv-python
Cleaning up...
No distributions at all found for opencv-python
Storing debug log for failure in /root/.pip/pip.log

我也嘗試在我的要求中添加“ http://rpmfind.net/linux/fedora/linux/development/rawhide/x86_64/os/Packages/o/opencv-python-2.4.9-3.fc22.x86_64.rpm ” .txt但失敗如下:

Downloading/unpacking http://rpmfind.net/linux/fedora/linux/development/rawhide/x86_64/os/Packages/o/opencv-python-2.4.9-3.fc22.x86_64.rpm (from -r /opt/python/ondeck/app/requirements.txt (line 14))
  Cannot unpack file /tmp/pip-ONBFer-unpack/opencv-python-2.4.9-3.fc22.x86_64.rpm (downloaded from /tmp/pip-SUUfnS-build, content-type: application/x-rpm); cannot detect archive format
Cleaning up...
Cannot determine archive format of /tmp/pip-SUUfnS-build
Storing debug log for failure in /root/.pip/pip.log

我也試過“sudo yum install opencv-python”,但失敗如下:

Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/2014.09                                        | 2.1 kB     00:00
amzn-updates/2014.09                                     | 2.3 kB     00:00
No package opencv-python available.
Error: Nothing to do

對於我的開發系統,我從http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv獲得了安裝程序。 我怎樣才能在EB上安裝它?

如果沒有辦法安裝這個確切的包裝,請問最好的選擇是什么?

如果您能夠考慮變通方法,可以使用以下選項。

使用AWS Elastic Beanstalk

沒有AWS Elastic Beanstalk

現在簡單的解決方法是安裝pip 1.2.1,它不需要SSL:

curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
python setup.py install

也許這可以幫到你

我在Ubuntu 14.04的專用實例上運行OpenCV,在Amazon EC2上支持Python。 我必須從源代碼安裝和編譯才能獲得可靠的python堆棧。

暫無
暫無

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

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