如何在 heroku 上安装 gdbm 模块?
How can I install gdbm module on heroku?
我是 运行 heroku 上的 celery worker,在启动 worker 时我总是遇到错误:
ImportError: No module named gdbm
我已经通过 运行 python 在 heroku 上确认了这一点并尝试导入 gdbm:
$ heroku run python
Running `python` attached to terminal... up, run.1960
Python 2.7.8 (default, Jul 9 2014, 20:47:08)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gdbm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gdbm
>>> exit()
如何在 heroku 上安装这个模块?我需要将特定包添加到 requirements.txt
吗?如果有,是什么版本?
感谢您的帮助!
根据 Heroku 文档,无法使用 文件系统数据库
https://devcenter.heroku.com/articles/read-only-filesystem
The following types of behaviors are not supported:
- Caching pages in the public directory
- Saving uploaded assets to local disk (e.g. with attachment_fu or - paperclip)
- Writing full-text indexes with Ferret
- Writing to a filesystem database like SQLite or GDBM
- Accessing a git repo for an app like git-wiki
我是 运行 heroku 上的 celery worker,在启动 worker 时我总是遇到错误:
ImportError: No module named gdbm
我已经通过 运行 python 在 heroku 上确认了这一点并尝试导入 gdbm:
$ heroku run python
Running `python` attached to terminal... up, run.1960
Python 2.7.8 (default, Jul 9 2014, 20:47:08)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gdbm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gdbm
>>> exit()
如何在 heroku 上安装这个模块?我需要将特定包添加到 requirements.txt
吗?如果有,是什么版本?
感谢您的帮助!
根据 Heroku 文档,无法使用 文件系统数据库 https://devcenter.heroku.com/articles/read-only-filesystem
The following types of behaviors are not supported:
- Caching pages in the public directory
- Saving uploaded assets to local disk (e.g. with attachment_fu or - paperclip)
- Writing full-text indexes with Ferret
- Writing to a filesystem database like SQLite or GDBM
- Accessing a git repo for an app like git-wiki