私はPythonライブラリPyDDEを使ってFlask Webサービスを持っていますが、これはPyPI上に配布されていますが、何らかの形でピピインストールすることはできません。私はpip install git+https://github.com/hensing/PyDDE.git
を使ってこのライブラリをローカル環境にインストールするか、クローンしてsetup.py
をインストールします。AWS Elastic BeanstalkまたはGoogle App EngineにpipをインストールしていないPythonライブラリを使用するにはどうすればよいですか?
AWS Elastic BeanstalkまたはGoogle App Engine Flexible Environmentのいずれかでプロジェクトをアップロードしてビルドしようとすると、このライブラリの一致するディストリビューションが見つからないという問題が発生します。
この問題を解決するための回避策はありますか?ここで
はGAE柔軟からのエラーメッセージです:
Step #1: Could not find a version that satisfies the requirement PyDDE (from -r requirements.txt (li
ne 7)) (from versions:)
Step #1: No matching distribution found for PyDDE (from -r requirements.txt (line 7))
Step #1: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
Finished Step #1
ERROR
ERROR: build step "gcr.io/cloud-builders/[email protected]:331786b295647a4560ed004a46761ee91409e754df7ffa7
54a67000bd020729a" failed: exit status 1
Step #1:
------------------------------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/gcr/buil
ds/6ace1019-8bf5-434b-b916-5c6cae84de9f?project=project-190120 Failure status: UNKNOWN: Err
or Response: [2] Build failed; check build logs for details
そして、ここでは私のrequirements.txt
です:
Flask==0.12.2
Werkzeug==0.12.2
gunicorn==19.7.1
pandas>0.20.0
numpy>1.13.0
scipy>0.19.0
PyDDE
google-api-python-client
UPDATE:
私はrequirements.txt
にこの行を追加:
-e git+git://github.com/hensing/PyDDE.git#egg=PyDDE
これはGAEで動作します。
ありがとう@hansaplast!
ただし、AWS Elastic Beanstalkはこれを受け付けませんrequirements.txt
。これは、このエラーがスローされます。
INFO: Created CloudWatch alarm named: awseb-e-3tu2ajdxug-stack-AWSEBCloudwatchAlarmLow-8NOPISSRAAEH
ERROR: Your requirements.txt is invalid. Snapshot your logs for details.
ERROR: [Instance: i-03e92fa3c58b6e010] 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 2.
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].
ERROR: Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
エラーメッセージを共有できますか? – hansaplast
'requirements.txt'の内容をあなたの質問に入れることができますか? – hansaplast
* requirement.txtを使用している場合、[この回答で提案された] requirements.txtに '-e git:// https:// github.com/hensing/PyDDE.git'を追加できますか(https ://stackoverflow.com/a/16584935/119861)? ' – hansaplast