0

I'm a django newby and this is my first question posted to StackOverflow:

I've successfully deployed a couple of apps to heroku over the past month but when I added a module fixed2csv that imports dateutil.parser, heroku fails to find the module even though it's in the requirements.txt file.

Here's a snippet from heroku's deploy message...

   Downloading/unpacking python-dateutil==2.2 (from -r requirements.txt (line 20))
     Running setup.py (path:/tmp/pip_build_u20147/python-dateutil/setup.py) egg_info for

package python-dateutil

   Downloading/unpacking fixed2csv==0.2.3 (from -r requirements.txt (line 21))
     Downloading fixed2csv-0.2.3.tar.gz
     Running setup.py (path:/tmp/pip_build_u20147/fixed2csv/setup.py) egg_info for package

fixed2csv Traceback (most recent call last): File "", line 17, in File "/tmp/pip_build_u20147/fixed2csv/setup.py", line 7, in import fixed2csv File "fixed2csv.py", line 10, in import dateutil.parser ImportError: No module named dateutil.parser Complete output from command python setup.py egg_info: Traceback (most recent call last):

     File "<string>", line 17, in <module>

     File "/tmp/pip_build_u20147/fixed2csv/setup.py", line 7, in <module>

       import fixed2csv

     File "fixed2csv.py", line 10, in <module>

       import dateutil.parser

   ImportError: No module named dateutil.parser

   ----------------------------------------
   Cleaning up...
   Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_u20147/fixed2csv
   Storing debug log for failure in /app/.pip/pip.log

! Push rejected, failed to compile Python app

Everything works fine in my virtualenv when I installed python-dateutil so I'm not sure where to go from here.

Update: I worked around it by not using the module that required python-dateutil. I would be interested to know how to get Heroku to recognize python-dateutil though because it's way nicer to use than messing around with strptime format strings.

  • It looks like `fixed2csv` depends on `dateutil`, so make sure `dateutil` comes _before_ `fixed2csv` in the `requirements.txt` file – karthikr Jun 08 '14 at 01:57
  • python-dateutil==2.2 is before fixed2csv. In the deploy message above you can see that it is downloading and unpacking dateutil ahead of fixed2csv. I've tried moving dateutil to the top of the requirements.txt file and also just above fixed2csv. It didn't make a difference. – usually-confused Jun 08 '14 at 11:15
  • were you able to solve this? – transient_loop Oct 04 '16 at 02:23

0 Answers0