Heroku:sh:cython:找不到 [英] Heroku: sh: cython: not found
问题描述
我试图将我的Python3应用推送到Heroku。它使用 gevent
,它有一个 Cython
依赖项。当我尝试推送到Heroku时,出现以下错误:
运行cython -o gevent.core.c gevent / core。 pyx#!EV_USE_SIGNALFD&& !定义(LIBEV_EMBED)&& !定义(_WIN32)
sh:cython:找不到
Traceback(最近调用最后一个):
文件util / cythonpp.py ,第801行,在< module>
process_filename(filename,options.output_file)
在process_filename
output = run_cython( pyx_filename,sourcehash,output_filename,banner,comment)
run_cython中的文件util / cythonpp.py,第529行
系统(命令,注释)
系统
中的文件util / cythonpp.py,第539行,引发AssertionError('%r失败,代码为%s'%(command,result))
AssertionError:'cython -o gevent.core.c gevent / core.pyx'失败,代码为32512
make:*** [gevent / gevent.core.c]错误1
----------------------------------------
命令/app/.heroku/python/bin/python -cimport setuptools; __file __ ='/ app / .heroku / src / gevent / setup.py'; exec(compile(open(__ file __)。read()。replace ('\r\\\
','\\\
'),__file__,'exec'))develop --no-deps failed with error code 1 in /app/.heroku/src/gevent
存储完整的日志/app/.pip/pip.log
!推送被拒绝,未能编译Python应用程序
我该如何解决这个问题?
从 Heroku常见问题解答 ...
我需要C扩展模块吗? strong>
是的。如果模块将用pip正确安装。大多数web应用程序需要
的库在构建时可用。
但是,有时模块所需的共享库不是
可用。如果这对您造成问题,您应该联系
support@heroku.com
寻求帮助。
...所以你可能需要通过电子邮件发送 gevent
和/或 cython
支持。
I'm trying to push my Python3 app to Heroku. It uses gevent
which has a Cython
dependency. When I try to push to Heroku, I get this error:
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
How can I fix this?
From the 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.
...so you'll probably have to e-mail them to get gevent
and/or cython
support.
这篇关于Heroku:sh:cython:找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!