gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 03:22:41 25 4
gpt4 key购买 nike

我一直在关注 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 requirements.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.py collectstatic

但是,当我运行 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com