如何在Amazon Elastic Beanstalk上安装opencv python

如何在Amazon Elastic Beanstalk上安装opencv python,python,opencv,amazon-web-services,amazon-ec2,amazon-elastic-beanstalk,Python,Opencv,Amazon Web Services,Amazon Ec2,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

我一直在本地开发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 opencvpython
it表示“下载/解压opencvpython”一分钟左右,那么:

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
我还尝试将“”添加到我的requirements.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
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
我还尝试了“sudo-yum-install-opencv-python”,但失败如下:

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
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
对于我的开发系统,我从中获得了安装程序。请问如何在电子商务上安装


如果没有安装这个精确包的方法,那么最好的选择是什么?

< P>这里有一些选项,如果你能考虑解决方法的话。 使用AWS弹性豆茎

  • AWS EB支持Windows Server 2012和2008

    由于安装程序看起来是Windows可执行文件,所以可以考虑在Windows上部署。

  • 使用Docker打包Fedora平台以在EB的AMI Linux主机上运行

    弹性豆茎支持Docker.

    下面是python上opencv的Docker构建文件示例。

不含AWS弹性豆茎

  • 其他Linux发行版

    如果你不是绝对需要弹性豆茎,那戴软呢帽怎么样? 这些安装说明很简单

    (基本上是yum安装numpy opencv*)

    你可以不用弹性豆茎使用EC2


目前最简单的解决方法是安装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

也许这可以帮助你

我正在Amazon EC2上的Ubuntu 14.04专用实例上运行OpenCV和Python支持。我必须从源代码安装和编译,才能用python获得可靠的堆栈

我认为python包索引中没有包
opencv python
?这是一样的。但它在fedora仓库里,对吗?不是python包索引。要安装它,您应该在fedora机器上使用
yum安装opencv-python
。不是
pip安装
。我已经试过了,并用结果更新了我的问题。我想这不是软呢帽机,谢谢。Windows可能是一种选择,但它比Linux更昂贵,所以除非它不可能或非常困难,否则我宁愿坚持使用Linux。虽然我并不是100%地致力于弹性豆茎,但它的简单性确实吸引了我。Docker看起来很有趣,但不会安装在我的32位Windows开发计算机上。。。我认为我的下一步可能是尝试寻找一个将安装在AmazonLinux上的opencv python的替代品。不过,我们仍然欢迎其他建议!非常感谢。我尝试了这个方法,但它仍然说“下载/解包opencv python找不到任何满足opencv python要求的下载,也找不到任何适用于opencv python的发行版”