当我将项目部署到 Heroku 时,youtokentome 出现问题

问题描述 投票:0回答:1

我尝试将我的Python项目部署到heroku并遇到这个问题:

Collecting youtokentome==1.0.6
remote:          Downloading youtokentome-1.0.6.tar.gz (86 kB)
remote:            ERROR: Command errored out with exit status 1:
remote:             command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k3by6gof/youtokentome/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k3by6gof/youtokentome/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-hayjf3lo
remote:                 cwd: /tmp/pip-install-k3by6gof/youtokentome/
remote:            Complete output (5 lines):
remote:            Traceback (most recent call last):
remote:              File "<string>", line 1, in <module>
remote:              File "/tmp/pip-install-k3by6gof/youtokentome/setup.py", line 5, in <module>
remote:                from Cython.Build import cythonize
remote:            ModuleNotFoundError: No module named 'Cython'
remote: 

       ----------------------------------------

但是我有:

Cython==0.29.24 in my requirements.txt

python heroku cython
1个回答
0
投票

安装 conda 并使用 conda 安装 cython。

conda install -y cython

那么,

pip install youtokentome

这对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.