gpt4 book ai didi

python - Heroku:sh:cython:未找到

转载 作者:太空狗 更新时间:2023-10-30 00:50:53 25 4
gpt4 key购买 nike

我正在尝试将我的 Python3 应用程序推送到 Heroku。它使用具有 Cython 依赖项的 gevent。当我尝试推送到 Heroku 时,出现此错误:

Running cython -o gevent.core.c gevent/core.pyx  # !EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)

sh: cython: not found

Traceback (most recent call last):

File "util/cythonpp.py", line 801, in <module>

process_filename(filename, options.output_file)

File "util/cythonpp.py", line 85, in process_filename

output = run_cython(pyx_filename, sourcehash, output_filename, banner, comment)

File "util/cythonpp.py", line 529, in run_cython

system(command, comment)

File "util/cythonpp.py", line 539, in system

raise AssertionError('%r failed with code %s' % (command, result))

AssertionError: 'cython -o gevent.core.c gevent/core.pyx' failed with code 32512

make: *** [gevent/gevent.core.c] Error 1

----------------------------------------
Command /app/.heroku/python/bin/python -c "import setuptools; __file__='/app/.heroku/src/gevent/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1 in /app/.heroku/src/gevent
Storing complete log in /app/.pip/pip.log

! Push rejected, failed to compile Python app

我该如何解决这个问题?

最佳答案

来自Heroku FAQ ...

Can I require modules with C extensions?

Yes. If the module will install properly with pip. Most libraries that are required for web applications are available at build time.

However, sometimes a shared library needed for a module isn’t available. If this becomes a problem for you, you should contact support@heroku.com for help.

...因此您可能需要通过电子邮件向他们发送电子邮件以获得 gevent 和/或 cython 支持。

关于python - Heroku:sh:cython:未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16932312/

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