2016-05-11 4 views
2

Я пытаюсь развернуть свое приложение django на Heroku, используя следующие рекомендации: https://devcenter.heroku.com/articles/deploying-python. Я достиг точки, где я должен создать и заполнить файл «requirements.txt» с помощью следующей команды:pip install requirements.txt проблема при развертывании приложения Django на Heroku

$ pip install -r requirements.txt 

Однако, я получаю следующее сообщение об ошибке

You must give at least one requirement to install (see "pip help install") 

Я попробовал две другие команды

$ pip install -r requirements.txt requirements.txt 
$ pip install --allow-all-external requirements.txt 

, но в обоих случаях я получаю следующую ошибку

Collecting requirements.txt 
/home/bastien/python/framework/scrapping/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. 
SNIMissingWarning 
/home/bastien/python/framework/scrapping/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. 
InsecurePlatformWarning 

Не могли бы вы рассказать мне, откуда эта проблема, как я могу ее разрешить, используя соответствующие командные строки или если есть способ заполнить файл requirements.txt любым другим способом? Благодарю.

+1

это просто означает, что ваш файл требований пуст. Вы должны поставить список требований там! – e4c5

ответ

3

pip install -r requirements.txt не заполняется requirements.txt - он считывает его как источник имен пакетов для установки. См. https://pip.pypa.io/en/stable/user_guide/#requirements-files для получения дополнительной информации.

Чтобы записать текущий список установленных пакетов в requirements.txt, попробуйте pip freeze > requirements.txt.

Смежные вопросы