系统:Ubuntu Server 20.04 LTS 64bit
我是在腾讯云的服务器上部署的,输入python3 -m pip install -r requirements.txt
后,开始很正常,但是到最后就报错了。
`error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [63 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/jieba_fast_functions_py3.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/jieba_fast_functions_py2.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/main.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/_compat.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/init.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/init.pyc -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/dict.txt -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/_compat.pyc -> build/lib.linux-x86_64-3.8/jieba_fast
creating build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_start.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/jieba_fast_functions_py3.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_emit.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_trans.p -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/jieba_fast_functions_py2.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_trans.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/init.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_start.p -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_start.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_trans.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_emit.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_emit.p -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/init.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
creating build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/textrank.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/idf.txt -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/tfidf.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/init.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/analyzer.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
creating build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_start.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_trans.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/char_state_tab.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_trans.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/char_state_tab.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_start.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_emit.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_emit.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/viterbi.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/init.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
creating build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py2.i -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py2_wrap.c -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_py3.py -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_py2.py -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.c -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py3.i -> build/lib.linux-x86_64-3.8/jieba_fast/source
running build_ext
building '_jieba_fast_functions_py3' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/jieba_fast
creating build/temp.linux-x86_64-3.8/jieba_fast/source
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.c -o build/temp.linux-x86_64-3.8/jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.o
jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.c:149:11: fatal error: Python.h: No such file or directory
149 | # include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for jieba-fast
Running setup.py clean for jieba-fast
Failed to build jieba-fast
Installing collected packages: jieba-fast, fake-useragent, appdirs, zipp, websockets, w3lib, uvloop, typing-extensions, tqdm, tomlkit, soupsieve, sniffio, python-dotenv, pypinyin, pymongo, multidict, lxml, loguru, httptools, h11, cssselect, certifi, asgiref, yarl, uvicorn, pyquery, pydantic, importlib-metadata, beautifulsoup4, anyio, watchgod, starlette, pyppeteer, bs4, requests-html, fastapi, nonebot2, nonebot-adapter-onebot
Running setup.py install for jieba-fast ... error
error: subprocess-exited-with-error
× Running setup.py install for jieba-fast did not run successfully.
│ exit code: 1
╰─> [63 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/jieba_fast_functions_py3.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/jieba_fast_functions_py2.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/main.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/_compat.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/init.py -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/init.pyc -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/dict.txt -> build/lib.linux-x86_64-3.8/jieba_fast
copying jieba_fast/_compat.pyc -> build/lib.linux-x86_64-3.8/jieba_fast
creating build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_start.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/jieba_fast_functions_py3.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_emit.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_trans.p -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/jieba_fast_functions_py2.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_trans.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/init.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_start.p -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_start.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_trans.pyc -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_emit.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/prob_emit.p -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
copying jieba_fast/finalseg/init.py -> build/lib.linux-x86_64-3.8/jieba_fast/finalseg
creating build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/textrank.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/idf.txt -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/tfidf.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/init.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
copying jieba_fast/analyse/analyzer.py -> build/lib.linux-x86_64-3.8/jieba_fast/analyse
creating build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_start.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_trans.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/char_state_tab.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_trans.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/char_state_tab.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_start.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_emit.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/prob_emit.p -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/viterbi.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
copying jieba_fast/posseg/init.py -> build/lib.linux-x86_64-3.8/jieba_fast/posseg
creating build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py2.i -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py2_wrap.c -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_py3.py -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_py2.py -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.c -> build/lib.linux-x86_64-3.8/jieba_fast/source
copying jieba_fast/source/jieba_fast_functions_wrap_py3.i -> build/lib.linux-x86_64-3.8/jieba_fast/source
running build_ext
building '_jieba_fast_functions_py3' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/jieba_fast
creating build/temp.linux-x86_64-3.8/jieba_fast/source
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.c -o build/temp.linux-x86_64-3.8/jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.o
jieba_fast/source/jieba_fast_functions_wrap_py3_wrap.c:149:11: fatal error: Python.h: No such file or directory
149 | # include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> jieba-fast
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.`
尝试忽略这些错误然后继续安装,最后运行nb run后(前面还有一堆报错):
![image](https://user-images.githubusercontent.com/85662431/184608619-91c8f2a4-f2d8-44fb-8553-43e4009440f5.png)
该怎么办,尝试谷歌了很久也没有解决...