- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我一直在本地开发一个 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”添加到我的 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
我也试过“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 EB 支持 Windows Server 2012 和 2008
由于您的安装程序似乎是 Windows 可执行文件,您可以考虑在 Windows 上部署。 https://aws.amazon.com/net/
使用Docker打包Fedora平台运行在EB的AMI Linux主机上。
Elastic Beanstalk 支持 Docker。
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.html
这是 python 上 opencv 的 Docker 构建文件示例。 https://registry.hub.docker.com/u/ibotdotout/python-opencv/
没有 AWS Elastic Beanstalk
其他 Linux 发行版
如果您不是绝对需要 Elastic Beanstalk,那么运行 Fedora 怎么样?这些安装说明很简单。
http://docs.opencv.org/trunk/doc/py_tutorials/py_setup/py_setup_in_fedora/py_setup_in_fedora.html(基本上是 yum install numpy opencv* )
您可以在没有 Elastic Beanstalk 的情况下使用 EC2。
关于python - 如何在 Amazon Elastic Beanstalk 上安装 opencv-python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26725954/
我是一名优秀的程序员,十分优秀!