python - Heroku - 执行系统检查时卡住

标签 python heroku

我一直在关注 https://devcenter.heroku.com/articles/getting-started-with-python 上的指南,我做的唯一不同的是我使用了 virtualenv -p D:\Python27\python.exe venv 而不是 virtualenv venv 因为我在 Python 中安装了 virtualenv 3.5.

当我继续声明应用程序依赖项后,我在使用 pip 安装依赖项时遇到了问题;

pip install -r requests.txt --allow-all-external

一旦到达 psycopg2 依赖项,就会给我以下内容:

Collecting psycopg2==2.6 (from -r requirements.txt (line 5))
  Using cached psycopg2-2.6.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info\psycopg2.egg-info
    writing pip-egg-info\psycopg2.egg-info\PKG-INFO
    writing top-level names to pip-egg-info\psycopg2.egg-info\top_level.txt
    writing dependency_links to pip-egg-info\psycopg2.egg-info\dependency_links.
txt
    writing manifest file 'pip-egg-info\psycopg2.egg-info\SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    Error: pg_config executable not found.

    Please add the directory containing pg_config to the PATH
    or specify the full executable path with the option:

        python setup.py build_ext --pg-config /path/to/pg_config build ...

    or with the pg_config option in 'setup.cfg'.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\seven_~1
\appdata\local\temp\pip-build-cdwueb\psycopg2

所以我将requirements.txt中的psycopg2版本从2.6更改为2.6.1。然后所有依赖项都正确安装,并且我能够运行 python manage.pycollectstatic

但是,当我运行 heroku local web -f Procfile.windows 时,我得到:

forego | starting web.1 on port 5000
web.1  | Performing system checks...

它无限期地保持在这种状态。

最佳答案

我也遇到这个问题了。当我运行:“heroku local web -f Procfile.windows”时它卡住了,然后我尝试像这样手动执行:“python manage.py runserver 0.0.0.0:5000”并且它工作得很好。

关于python - Heroku - 执行系统检查时卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34180414/

相关文章:

node.js - 一个包含多个 Heroku 应用程序的 Node.js 代码库

python - 运行由字符串定义的类的特定方法

python - 在 heroku 上安装 pdftotext 库

jquery - Django + Jquery,扩展AJAX div

python - 无法从其他路径导入类 - ValueError : Empty module name

java - 如何使用 NodeJs 在 Heroku 上设置 liquibase?

mysql - 在 Rails 5 上制作 postgres 数据库,以便将应用程序部署到 heroku

通过 Heroku 部署时 CSS 在 Safari 上中断,但在本地运行完美?

python - 如何与另一个 Python 应用程序共享 Django 数据库?

python - 从 python 列表中选取最高分