2
我努力讓自己在Heroku的OpenCV的工作OpenCV的工作,但我已經在服務器的日誌文件中的以下錯誤:不能讓在Heroku
2017-10-05T23:17:08.145096+00:00 heroku[web.1]: State changed from crashed to starting
2017-10-05T23:17:19.477843+00:00 heroku[web.1]: Starting process with command `python Main.py`
2017-10-05T23:17:23.469550+00:00 heroku[web.1]: State changed from starting to crashed
2017-10-05T23:17:23.458477+00:00 heroku[web.1]: Process exited with status 1
2017-10-05T23:17:23.268234+00:00 app[web.1]: Traceback (most recent call last):
2017-10-05T23:17:23.268249+00:00 app[web.1]: File "Main.py", line 3, in <module>
2017-10-05T23:17:23.268434+00:00 app[web.1]: from MostDominantColor import get_color
2017-10-05T23:17:23.268541+00:00 app[web.1]: File "/app/utils.py", line 3, in <module>
2017-10-05T23:17:23.268435+00:00 app[web.1]: File "/app/MostDominantColor.py", line 2, in <module>
2017-10-05T23:17:23.268538+00:00 app[web.1]: import utils
2017-10-05T23:17:23.268648+00:00 app[web.1]: import cv2
2017-10-05T23:17:23.268790+00:00 app[web.1]: ImportError: libSM.so.6: cannot open shared object file: No such file or directory
2017-10-05T23:17:23.268663+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/cv2/__init__.py", line 9, in <module>
2017-10-05T23:17:23.268776+00:00 app[web.1]: from .cv2 import *
在__init__.py文件的第9行有一個一段代碼,對於IDE的自動完成時纔有用:
8 # make IDE's (PyCharm) autocompletion happy
9 from .cv2 import *
我明白,在我的代碼導入CV2時,這條線是造成一個問題,就是有沒有辦法從服務器上刪除線(知道CV2庫在服務器端用pip下載,所以我不能通過git將這樣的編輯推送到Heroku)
歡迎任何建議!
python : 3.6.2
opencv-python==3.3.0.10