2014-10-01 2 views
2

heroku에서 새로운 기능을 사용하고 거기에 내 앱을 배포하려고합니다. 그러나 그것은 실패하고 난 다음과 같은 메시지가 나타납니다heroku에 내 flask 앱을 ​​배치 할 수 없습니다.

  • 플라스크 == 0.10.1
  • configobj의 == 5.0.0
  • gunicorn :

    Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__ 
        file__='/tmp/pip_build_u21590/matplotlib/setup.py';exec(compile(getattr(tokenize 
    , 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" inst 
    all --record /tmp/pip-4IJQX6-record/install-record.txt --single-version-external 
    ly-managed --compile failed with error code 1 in /tmp/pip_build_u21590/matplotli 
    b 
    Traceback (most recent call last): 
    File "/app/.heroku/python/bin/pip", line 9, in <module> 
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() 
    File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/ 
    __init__.py", line 185, in main 
    return command.main(cmd_args) 
    File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/ 
    basecommand.py", line 161, in main 
    text = '\n'.join(complete_log) 
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 70: ordinal 
    not in range(128) 
    
    !  Push rejected, failed to compile Python app 
    
    To [email protected]:salty-oasis-2440.git 
    ! [remote rejected] master -> master (pre-receive hook declined) 
    error: failed to push some refs to '[email protected]:salty-oasis-2440.git' 
    

    그리고 위의 requirments에 내 목록을 == 19.1.1

  • itsdangerous == 0.24
  • jinja2의 == 2.7.2
  • matplot LIB == 1.3.1
  • networkx == 1.8.1
  • NumPy와의 == 1.8.1
  • 대한 파싱 된 == 1.5.7
  • 파이썬 dateutil == 2.2
  • WERKZEUG == 0.9. 4

무엇이 잘못 되었나요?

미리 감사드립니다.

pip freeze > requirements.txt 

주 : 당신은 당신의 프로젝트에 대한 VIRTUALENV 프로젝트 하나를 만드는 것을 고려해야하고이 모든 요구 사항을 설치하고 위의를 실행하지 않는 경우 다음 명령을 입력 VIRTUALENV 프로젝트의 작업 내부

+0

complete_log에는 유니 코드 문자가있을 것입니다. 끝내면 .encode() 메소드가 작동하는지 확인하십시오. –

+0

(파일)'requirements.txt'의 인코딩을보십시오. –

답변

0

이것은 Heroku가 문제가 아닙니다. 이 버전은 출시되지 않은 known issue with pip이며 2014 년 11 월 26 일 현재 수정되었습니다. 파이썬 2.7을 사용하고 있기 때문에 지금은 manually patch pip이 될 수 있습니다.

-1

명령을 다시 실행하십시오.

이후 프로젝트 저장소에 새로운 requirements.txt를 추가하고 Heroku가로 밀어 :

git commit requrements.txt -m "new one from pip" 
git push heroku 
+0

이것은 Heroku 앱에 대한 요구 사항을 생성하는 방법에 대한 설명이지만 질문에 대한 대답은 아닙니다. 실제 문제는'pip'입니다 (내 답변 참조). – gwg

+0

네 말이 맞아. 나는 OP가 수동으로 요구 사항 파일을 편집했다고 생각했습니다. –

관련 문제