看板 Python 關於我們 聯絡資訊
請問在 GCP 上的 App Engine ,使用 django 架站,要使用 memcache, requirements.txt 需要加入哪個 package? from google.appengine.api import memcache 這行一直出錯,local 端可以下載 google-cloud-sdk 去 call 裡面的 package,但是 在 GCP 要如何做? 感謝 有參考這篇 https://github.com/GoogleCloudPlatform/getting-started-python/issues/94 在我的 requirements.txt 加入 google-cloud==0.19.0 gunicorn==19.6.0 oauth2client==3.0.0 googleapis-common-protos==1.3.5 還是不行 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.233.85.190 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1566044351.A.E20.html
alvinlin: 我研究了一把。App Engine 隨附內建 Memcached 服務。如 08/18 13:06
alvinlin: 果你在本機上可以,有個步驟 https://cloud.google.com/ 08/18 13:06
alvinlin: python/django/appengine 讓你將你的環境移至 gcp 不知 08/18 13:06
alvinlin: 你試了嗎?至於 requirement,看範例上很單純 https:// 08/18 13:06
alvinlin: github.com/GoogleCloudPlatform/python-docs-samples/b 08/18 13:06
alvinlin: lob/master/appengine/standard/django/requirements.tx 08/18 13:06
alvinlin: t 08/18 13:06
alvinlin: 本想幫你試一把,但這環境相依性太高。太花時間了。請自 08/18 13:07
alvinlin: 己加油。 08/18 13:07
alvinlin: 感覺上它是個托管的docker環境,你就是把你在本機上的東 08/18 13:15
alvinlin: 西移值過去。然後不知道你本來用什麼DB,它用的是cloudD 08/18 13:15
alvinlin: B。我光裝本機相應的Sdk就快一小時去了。 08/18 13:15
先感謝花時間測試 那你有成功嗎? 因為我要架 web,需要 memcache,GCP 上只限定用 google 的 ※ 編輯: f496328mm (118.233.85.190 臺灣), 08/18/2019 13:38:14
alvinlin: 很可惜我手上沒有Django然後還要用DB做memcache的東西來 08/18 17:57
alvinlin: 試,所以我說這東西環境相依性高。要不你po你的code我來 08/18 17:57
alvinlin: 試看看 08/18 17:57