BUG:ERROR: Could not find a version that satisfies the requirement cython

BUG:ERROR: Could not find a version that satisfies the requirement cython

环境

python 复制代码
Python 3.10

详情

安装 pkuseg 分词库失败的错误。

错误提示

复制代码
ERROR: Could not find a version that satisfies the requirement cython (from versions: none)
`ERROR: No matching distribution found for cython`
distutils.errors.DistutilsError: Command '['/home/zmp/.conda/envs/keytechcpu/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpx394x6lt', '--quiet', '`cython`']' returned non-zero exit status 1.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

原因是安装cython依赖失败报错。

解决方法

可以手动安装

bash 复制代码
pip install cython

然后安装 pkuseg

bash 复制代码
pip install pkuseg==0.0.25
相关推荐
龘龍龙5 分钟前
Python基础(八)
开发语言·python
vibag1 小时前
FastAPI框架
python·pycharm·fastapi
站大爷IP1 小时前
从零开始用Python生成码:自定义样式与Logo嵌入
python
陌路物是人非1 小时前
记一个 @Resource BUG
java·开发语言·bug
天才测试猿2 小时前
2026全新软件测试面试八股文【含答案+文档】
自动化测试·软件测试·python·功能测试·测试工具·面试·职场和发展
TonyLee0172 小时前
python深拷贝与浅拷贝机制
python
用户8356290780512 小时前
如何将 Python 列表高效导出为 Excel 文件
后端·python
安娜的信息安全说2 小时前
LangGraph:构建智能工作流的新方式
python·ai·langgraph
爱吃泡芙的小白白3 小时前
如何在现有配置好环境的Pycharm中安装jupyterlab这个工具
ide·python·pycharm·notebook·虚拟环境·jupyterlab
六毛的毛3 小时前
比较含退格的字符串
开发语言·python·leetcode