AWS Elastic Beanstalk-python-requirements.txt无效
我遵循AWS Elastic Beanstalk的Flask教程来部署我的应用程序。 虽然我得到了错误,但您的requirements.txt无效-全文如下。我自己不写需求文件,而是通过pipfreeze命令生成它 当我使用scipy.optimize模块时,问题似乎发生了。不过,脚本在我的本地服务器上运行时没有任何问题 注:我是mac电脑用户 这是我的错误代码:AWS Elastic Beanstalk-python-requirements.txt无效,python,amazon-web-services,flask,amazon-elastic-beanstalk,Python,Amazon Web Services,Flask,Amazon Elastic Beanstalk,我遵循AWS Elastic Beanstalk的Flask教程来部署我的应用程序。 虽然我得到了错误,但您的requirements.txt无效-全文如下。我自己不写需求文件,而是通过pipfreeze命令生成它 当我使用scipy.optimize模块时,问题似乎发生了。不过,脚本在我的本地服务器上运行时没有任何问题 注:我是mac电脑用户 这是我的错误代码: ERROR: Your requirements.txt is invalid. Snapshot your logs for de
ERROR: Your requirements.txt is invalid. Snapshot your logs for details.
ERROR: [Instance: i-03702ea3033581434] Command failed on instance. Return code: 1 Output: (TRUNCATED)...)
File "/usr/lib64/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
这是我的requirements.txt文件:
Flask==0.10.1
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
numpy==1.13.0
scipy==0.19.0
Werkzeug==0.12.2
这是我的电子商务日志:
----------------------------------------
Command "/opt/python/run/venv/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-
build-DaiCZm/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().repla
ce('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RaLqbh-record/install-record.txt
--single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site
/python2.7/Pillow" failed with error code 1 in /tmp/pip-build-DaiCZm/Pillow
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2017-06-19 13:02:36,608 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
Traceback (most recent call last):
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
install_dependencies()
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus)
[2017-06-19T13:02:36.615Z] INFO [3080] - [Application deployment app-170619_145624@1/StartupStage0/AppDeployPreHook/03deploy.py] : Activity failed.
[2017-06-19T13:02:36.615Z] INFO [3080] - [Application deployment app-170619_145624@1/StartupStage0/AppDeployPreHook] : Activity failed.
[2017-06-19T13:02:36.615Z] INFO [3080] - [Application deployment app-170619_145624@1/StartupStage0] : Activity failed.
[2017-06-19T13:02:36.616Z] INFO [3080] - [Application deployment app-170619_145624@1] : Completed activity. Result:
Application deployment - Command CMD-Startup failed
[2017-06-19T13:04:13.758Z] INFO [4895] - [CMD-TailLogs] : Starting activity...
[2017-06-19T13:04:13.758Z] INFO [4895] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2017-06-19T13:04:13.758Z] INFO [4895] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2017-06-19T13:04:13.758Z] INFO [4895] - [CMD-TailLogs/TailLogs] : Starting activity...
[2017-06-19T13:04:13.758Z] INFO [4895] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
copying PIL/JpegPresets.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/TarIO.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/ImageCms.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/ExifTags.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/PyAccess.py -> build/lib.linux-x86_64-2.7/PIL
running egg_info
writing requirements to Pillow.egg-info/requires.txt
writing Pillow.egg-info/PKG-INFO
writing top-level names to Pillow.egg-info/top_level.txt
writing dependency_links to Pillow.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis/*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
writing manifest file 'Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-DaiCZm/Pillow/setup.py", line 756, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
命令“/opt/python/run/venv/bin/python2.7-c”导入setuptools,标记化__文件\ \='/tmp/pip-
构建DaiCZm/Pillow/setup.py';exec(compile(getattr(tokenize,'open',open))(_文件__).read().repa
ce('\r\n','\n'),__文件__,'exec'))“安装--record/tmp/pip-RaLqbh-record/install-record.txt
--外部管理的单一版本--编译--安装头/opt/python/run/venv/include/site
/python2.7/Pillow“在/tmp/pip build DaiCZm/Pillow中失败,错误代码为1
您使用的是pip版本7.1.2,但版本9.0.1可用。
您应该考虑通过“PIP安装升级PIP”命令进行升级。
2017-06-19 13:02:36608安装依赖项时出错:命令'/opt/python/run/venv/bin/pip install-r/opt/python/ondeck/app/requirements.txt'返回非零退出状态1
回溯(最近一次呼叫最后一次):
文件“/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py”,第22行,在main中
安装依赖项()
文件“/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py”,第18行,安装依赖项
检查调用(“%s安装-r%s%”(os.path.join(APP\u VIRTUAL\u ENV,'bin,'pip'),requirements\u file),shell=True)
文件“/usr/lib64/python2.7/subprocess.py”,第541行,在check_调用中
引发被调用的进程错误(retcode,cmd)
CalledProcessError:Command'/opt/python/run/venv/bin/pip install-r/opt/python/ondeck/app/requirements.txt'返回非零退出状态1(Executor::NonZeroExitStatus)
[2017-06-19T13:02:36.615Z]信息[3080]-[Application deployment app-170619_145624@1/StartupStage0/AppDeployPreHook/03deploy.py]:活动失败。
[2017-06-19T13:02:36.615Z]信息[3080]-[Application deployment app-170619_145624@1/StartupStage0/AppDeployPreHook]:活动失败。
[2017-06-19T13:02:36.615Z]信息[3080]-[Application deployment app-170619_145624@1/StartupStage0]:活动失败。
[2017-06-19T13:02:36.616Z]信息[3080]-[Application deployment app-170619_145624@1]:已完成的活动。结果:
应用程序部署-命令CMD启动失败
[2017-06-19T13:04:13.758Z]信息[4895]-[CMD TailLogs]:开始活动。。。
[2017-06-19T13:04:13.758Z]信息[4895]-[CMD TailLogs/AddonsBefore]:开始活动。。。
[2017-06-19T13:04:13.758Z]信息[4895]-[CMD TailLogs/AddonsBefore]:已完成的活动。
[2017-06-19T13:04:13.758Z]信息[4895]-[CMD TailLogs/TailLogs]:开始活动。。。
[2017-06-19T13:04:13.758Z]信息[4895]-[CMD TailLogs/TailLogs/TailLogs]:开始活动。。。
正在复制PIL/JpegPresets.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/DcxImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/XVThumbImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/TarIO.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/PsdImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
正在复制PIL/DdsImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/ImageCms.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/PcxImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/BmpImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
正在复制PIL/WmfImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/McIdasImagePlugin.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/ExifTags.py->build/lib.linux-x86_64-2.7/PIL
复制PIL/PyAccess.py->build/lib.linux-x86_64-2.7/PIL
运行蛋_信息
将要求写入Pillow.egg-info/requires.txt
书写枕头。鸡蛋信息/PKG-info
将顶级名称写入Pillow.egg-info/top_level.txt
正在将dependency_链接写入Pillow.egg-info/dependency_links.txt
警告:未找到清单制造商:标准文件'-c'
正在读取清单文件'Pillow.egg info/SOURCES.txt'
正在读取清单模板“manifest.in”
警告:找不到与“*.sh”匹配的文件
未找到与“docs/\u static”匹配的以前包含的目录
警告:未找到与“.coveragerc”匹配的以前包含的文件
警告:未找到与“.editorconfig”匹配的以前包含的文件
警告:未找到以前包含的与“.scape.yaml”匹配的文件
警告:未找到与“.travis”匹配的以前包含的文件
警告:未找到与“.travis/*”匹配的以前包含的文件
警告:未找到与“appveyor.yml”匹配的以前包含的文件
警告:未找到以前包含的与“build_children.sh”匹配的文件
警告:未找到与“tox.ini”匹配的以前包含的文件
警告:在发行版中找不到以前包含的与“.git*”匹配的文件
警告:在发行版中找不到以前包含的与“*.pyc”匹配的文件
警告:在发行版中找不到以前包含的与“*.so”匹配的文件
正在编写清单文件'Pillow.egg info/SOURCES.txt'
运行build_ext
找不到jpeg的标题或库文件,
从源代码编译枕头时所需的依赖项。
请参阅以下位置的安装说明:
https://pillow.readthedocs.io/en/latest/installation.html
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/tmp/pip build DaiCZm/Pillow/setup.py”,第756行,在
引发所需的DependencyException(msg)
__主要要求的例外情况:
找不到jpeg的标题或库文件,
从源代码编译枕头时所需的依赖项。
请参阅以下位置的安装说明:
https://pillow.readthedocs.io/en/latest/installation.html