python - 在 WSL2 (Ubuntu) 上安装 PyStemmer 时出错
问题描述
我想澄清一下我是 linux 的菜鸟
您好,科技之神!
我想在 WSL2 (LINUX) 上安装 PyStemmer 但我遇到了这个错误。
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xdkteqvb/pystemmer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xdkteqvb/pystemmer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7ar3x6pr/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/palash/.local/include/python3.8/PyStemmer
cwd: /tmp/pip-install-xdkteqvb/pystemmer/
Complete output (15 lines):
running install
running build
running build_ext
skipping 'src/Stemmer.c' Cython extension (up-to-date)
building 'Stemmer' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
creating build/temp.linux-x86_64-3.8/libstemmer_c
creating build/temp.linux-x86_64-3.8/libstemmer_c/src_c
creating build/temp.linux-x86_64-3.8/libstemmer_c/runtime
creating build/temp.linux-x86_64-3.8/libstemmer_c/libstemmer
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 -Isrc -Ilibstemmer_c/include -I/usr/include/python3.8 -c src/Stemmer.c -o build/temp.linux-x86_64-3.8/src/Stemmer.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xdkteqvb/pystemmer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xdkteqvb/pystemmer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7ar3x6pr/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/palash/.local/include/python3.8/PyStemmer Check the logs for full command output.
所以有些历史。首先它告诉“没有名为 Cython 的模块”,这很容易做到,仅此而已python3 -m pip install cython
!
(安装时 Pip 不在 PATHWARNING: The scripts pip, pip3 and pip3.8 are installed in '/home/palash/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
消息中
我不知道发生了什么,所以请帮忙!
一些教程告诉我在 Linux 上做,我不想安装整个 linux 发行版。评论中有人说 WSL2 对他有用
谢谢你!
解决方案
推荐阅读
- c++ - Windows 任务计划程序 - 现有任务修改 c++
- ios - 主/详细视图:从添加视图到详细视图,反之亦然
- reactjs - 警告:收到非布尔属性主属性的真值
- java - 如何在触摸时启用editText
- swift - 在 Swift 4.0 中阻止 UIScrollView 上的垂直滚动的问题
- sql - 如何从自动完成文本框中检索数据
- reactjs - 如何更新 redux 存储中的对象?
- python - /accounts/signup/ 'str' 对象的 AttributeError 没有属性 'add'
- sql-server - 如何修复 SQL Server 中的(将表达式转换为数据类型日期时间的算术溢出错误)错误
- java - BufferedReader 读取的字节数