[在AI平台上安装trainer
软件包时收到此错误,
追踪(最近一次通话):文件“”,第1行,在文件“ /tmp/pip-install-_u8thvm6/pycocotools/setup.py”,行2,在从Cython.Build中导入cythonize ImportError:否名为“ Cython”的模块]]
尽管我在
'Cython'
中加入了setup.py
。
setup.py:
import setuptools
NAME = 'trainer'
VERSION = '1.0'
REQUIRED_PACKAGES = [
'Cython', # Cython, mentioned before pycocotools
'tensorflow-gpu',
'google-cloud-storage',
'gcsfs',
'pycocotools'
]
setuptools.setup(
name=NAME,
version=VERSION,
packages=setuptools.find_packages(),
install_requires=REQUIRED_PACKAGES,
include_package_data=True,
description='Trainer package')
我在AI平台上安装教练包时出现此错误,回溯(最近一次调用是最近的):文件“”,第1行,在文件“ /tmp/pip-install-_u8thvm6/pycocotools/setup.py”中,第2行,...
[您需要在运行setup.py之前安装cython。问题在于,cython是在构建时需要的,而不是在运行时需要的,并且无法保证您在install_requires
中列出的pqckages的安装顺序。因此,当pip尝试安装pycocotools
时,它尚未安装cython并中止。