无法部署到heroku - 没有名为的模块

时间:2015-05-24 17:39:11

标签: python django heroku

以前在heroku上运行良好的应用程序,我因为错误而无法部署:

$ pip freeze > requirements.txt
Cython==0.22
Django==1.8.1
argparse==1.2.1
gunicorn==19.3.0
h5py==2.5.0
numexpr==2.4.3
numpy==1.9.2
pandas==0.16.1
python-dateutil==2.4.2
pytz==2015.4
six==1.9.0
table==0.0.4
tables==3.2.0
whitenoise==1.0.6
wsgiref==0.1.2

然后

$ git push heroku master

然后:

Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing dependencies with pip
remote: You are using pip version 6.1.1, however version 7.0.1 is available.
remote: You should consider upgrading via the 'pip install --upgrade pip' command.
remote:        Collecting Cython==0.22 (from -r requirements.txt (line 1))
remote:          Downloading cython-0.22.tar.gz (1.6MB)
remote:        Collecting argparse==1.2.1 (from -r requirements.txt (line 3))
remote:          Downloading argparse-1.2.1.tar.gz (69kB)
remote:        Collecting h5py==2.5.0 (from -r requirements.txt (line 5))
remote:          Downloading h5py-2.5.0.tar.gz (684kB)
remote:        Collecting numexpr==2.4.3 (from -r requirements.txt (line 6))
remote:          Downloading numexpr-2.4.3.tar.gz (85kB)
remote:        Collecting numpy==1.9.2 (from -r requirements.txt (line 7))
remote:          Downloading numpy-1.9.2.tar.gz (4.0MB)
remote:        Collecting pandas==0.16.1 (from -r requirements.txt (line 8))
remote:          Downloading pandas-0.16.1.tar.gz (5.0MB)
remote:        Collecting python-dateutil==2.4.2 (from -r requirements.txt (line 9))
remote:          Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB)
remote:        Collecting pytz==2015.4 (from -r requirements.txt (line 10))
remote:          Downloading pytz-2015.4-py2.py3-none-any.whl (475kB)
remote:        Collecting six==1.9.0 (from -r requirements.txt (line 11))
remote:          Downloading six-1.9.0-py2.py3-none-any.whl
remote:        Collecting table==0.0.4 (from -r requirements.txt (line 12))
remote:          Downloading table-0.0.4.tar.gz
remote:            Complete output from command python setup.py egg_info:
remote:            Traceback (most recent call last):
remote:              File "<string>", line 20, in <module>
remote:              File "/tmp/pip-build-447HOz/table/setup.py", line 4, in <module>
remote:                from table import __version__ as version
remote:              File "table.py", line 22, in <module>
remote:                import numpy
remote:            ImportError: No module named numpy
remote:            
remote:            ----------------------------------------
remote:     Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-447HOz/table
remote: 
remote:  !     Push rejected, failed to compile Python app
remote: 
remote: Verifying deploy...

这是什么?

1 个答案:

答案 0 :(得分:-2)

您好像没有安装numpy

要执行此操作,请pip install numpyeasy_install numpy

希望这有帮助。