IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> Linux 安装 gensim 失败问题 -> 正文阅读

[系统运维]Linux 安装 gensim 失败问题

今天安装gensim一直失败,网上找了各种办法都不得,换了各种python版本,虚拟环境都创建了好几次

numy、scipy都装了也无济于事,正准备放弃时,仔细看了错误信息的后几行

gensim/models/nmf_pgd.c: In function ‘__Pyx_InitGlobals’:
? ? gensim/models/nmf_pgd.c:16518:1: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
? ? ?PyEval_InitThreads();
? ? ?^~~~~~~~~~~~~~~~~~
? ? In file included from /usr/local/python3/include/python3.9/Python.h:154,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/ceval.h:130:37: note: declared here
? ? ?Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c: In function ‘__Pyx_ParseOptionalKeywords’:
? ? gensim/models/nmf_pgd.c:17188:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17188:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
? ? ?Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17188:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17188:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17188:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
? ? ?Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17188:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17204:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17204:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
? ? ?Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17204:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17204:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17204:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
? ? ?Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c:17204:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
? ? ?static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~~~~~~
? ? gensim/models/nmf_pgd.c: In function ‘__Pyx_decode_c_string’:
? ? gensim/models/nmf_pgd.c:18132:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
? ? ? ? ? ? ?return PyUnicode_FromUnicode(NULL, 0);
? ? ? ? ? ? ?^~~~~~
? ? In file included from /usr/local/python3/include/python3.9/unicodeobject.h:1026,
? ? ? ? ? ? ? ? ? ? ?from /usr/local/python3/include/python3.9/Python.h:106,
? ? ? ? ? ? ? ? ? ? ?from gensim/models/nmf_pgd.c:18:
? ? /usr/local/python3/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
? ? ?Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^~~~~~~~~~~~~~~~~~~~~
? ? gcc -pthread -shared build/temp.linux-x86_64-3.9/gensim/models/nmf_pgd.o -o build/lib.linux-x86_64-3.9/gensim/models/nmf_pgd.cpython-39-x86_64-linux-gnu.so
? ? building 'gensim.models.doc2vec_inner' extension
? ? gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python3/include/python3.9 -I/usr/local/python3/lib/python3.9/site-packages/numpy/core/include -c gensim/models/doc2vec_inner.cpp -o build/temp.linux-x86_64-3.9/gensim/models/doc2vec_inner.o -std=c++11
? ? gcc: error trying to exec 'cc1plus': execvp: No such file or directory
? ? error: command '/bin/gcc' failed with exit code 1

? ? ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/python3/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yole547i/gensim_ae8bbb5463c2490b90bb2f166395f231/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yole547i/gensim_ae8bbb5463c2490b90bb2f166395f231/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6bbjeqt2/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/python3/include/python3.9/gensim Check the logs for full command output.
原来是缺少gcc-c++编译器,于是安装yum install gcc-c++

然后进行gensim安装马上成功了

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2021-10-28 12:41:54  更:2021-10-28 12:42:33 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/15 22:49:26-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码