在Heroku上使用自定义shell脚本

时间:2012-06-15 01:10:23

标签: django git shell heroku mdbtools

我正在使用Heroku和git来为django应用程序提供动力。该站点的部分功能允许用户上传.mdbs(Microsoft Access数据库),然后我们使用调用mdbtools(http://mdbtools.sourceforge.net/)的shell脚本进行解析。 shell脚本在本地运行良好,但在heroku站点上运行不正常。我认为问题是没有包含mdbtools。我尝试在requirements.txt中包含mdbtools,但没有任何运气。有没有人有任何想法?

我在requirements.txt中的每一行都包含了mdbtools和mdbtools-dev,如下所示:

mdbtools
mdbtools-dev

这是我在requirements.txt中包含mdbtools和mdbtools-dev时出现的错误

....
Requirement already satisfied (use --upgrade to upgrade): stripe in ./lib/python2.7/site-packages (from -r requirements.txt (line 7))
Downloading/unpacking mdbtools-dev (from -r requirements.txt (line 8))
Could not find any downloads that satisfy the requirement mdbtools-dev (from -r requirements.txt (line 8))
No distributions at all found for mdbtools-dev (from -r requirements.txt (line 8))
Storing complete log in /app/.pip/pip.log
! Heroku push rejected, failed to compile Python app

2 个答案:

答案 0 :(得分:0)

http://pypi.python.org/pypi/mdbtools给出:

Not Found ()

为了使pip能够安装需求,它必须能够在PyPI上找到它们。看起来你正在使用PyPI上没有的软件包,因此pip无法找到它来安装它。

答案 1 :(得分:0)

<强>解

经过大量的摆弄,我找到的解决方案有点复杂。答案是下载debian软件包,然后复制库文件(.so)并将它们加载到您的服务器(或heroku)。从那里,确保在脚本开头将这些库的路径添加到LD Library Path,它应该可以正常工作

相关问题