0

I'm using Heroku and git to power a django app. Part of the functionality of the site allows users to upload .mdbs (Microsoft Access Databases) , which we then parse using a shell script that calls mdbtools (http://mdbtools.sourceforge.net/). The shell script works well locally, but not on the heroku site. I think the problem is that mdbtools isn't included. I tried including mdbtools in requirements.txt, but didn't have any luck. Does anyone have any ideas?

I included mdbtools and mdbtools-dev each on its own line in requirements.txt like this:

mdbtools
mdbtools-dev

Here's the error I get when I include mdbtools and mdbtools-dev in requirements.txt

....
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
mythander889
  • 915
  • 5
  • 16
  • 23
  • Did you ever get a solution here? I'm working on a project now that will need to do something very similar. – David S Aug 30 '12 at 15:16
  • Yes. The solution is a little complicated. The answer is download the debian package, then copy out the library files and load them to your server (or heroku). From there, make sure you add the paths to those libraries to your LD Library Path at the start of the script, and it should work – mythander889 Aug 30 '12 at 17:37

2 Answers2

0

http://pypi.python.org/pypi/mdbtools gives:

Not Found ()

In order for pip to be able to install requirements, it has to be able to find them on PyPI. It looks like you're using a package that isn't available on PyPI, and thus pip can't find it to install it.

Amber
  • 507,862
  • 82
  • 626
  • 550
  • That makes sense -- do you know of any way around it? – mythander889 Jun 15 '12 at 02:06
  • Depends on whether the `mbdtools` package needs compilation or not. If it doesn't, you could just copy the files into your project. If it does, you'd probably have to do some sort of bootstrapping action yourself. – Amber Jun 15 '12 at 17:31
0

SOLUTION

After a lot of fiddling, the solution I found is a little complicated. The answer is download the debian package, then copy out the library files (.so) and load them to your server (or heroku). From there, make sure you add the paths to those libraries to your LD Library Path at the start of the script, and it should work

mythander889
  • 915
  • 5
  • 16
  • 23