Cython编译问题
错误:ValueError: Please build (or rebuild) Cython components with python setup.py build_ext --inplace
.
参照网上的方法,在代码目录执行python setup.py build_ext --inplace
,提示:
python: can't open file '/data/zhanghongxiao/SJ_task/task_4/setup.py': [Errno 2] No such file or directory
在fairseq安装目录下执行python setup.py build_ext --inplace
:没有解决
又百度了一下,有人说是numpy版本的问题,执行:
pip uninstall numpy #卸载之前版本的numpy
pip install numpy #重新下载
我的卸载之前numpy是1.19.5版本的,重新下载后是1.21.1版本的,亲测有效!!