首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在AWS EC2上安装稀疏点topn时出错:无法为基于pyproject.toml的项目安装稀疏点topn生成车轮

在AWS EC2上安装稀疏点topn时出错:无法为基于pyproject.toml的项目安装稀疏点topn生成车轮
EN

Stack Overflow用户
提问于 2022-01-18 10:38:20
回答 1查看 841关注 0票数 0

地狱,

在AWS EC2上安装稀疏点-topn时,我面临以下错误.我试过的事情:

cpython

  • install

  • 升级pip

  • 升级车轮

  • 安装cython

  • 安装

  • gcc

F 211

但似乎什么都起不到作用。请告诉我哪里出错了。

代码语言:javascript
复制
pip3 install sparse-dot-topn
Defaulting to user installation because normal site-packages is not writeable
Collecting sparse-dot-topn
  Using cached sparse_dot_topn-0.3.1.tar.gz (17 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.16.6 in ./.local/lib/python3.7/site-packages (from sparse-dot-topn) (1.20.3)
Requirement already satisfied: setuptools>=42 in ./.local/lib/python3.7/site-packages (from sparse-dot-topn) (60.5.0)
Requirement already satisfied: scipy>=1.2.3 in ./.local/lib/python3.7/site-packages (from sparse-dot-topn) (1.6.3)
Requirement already satisfied: cython>=0.29.15 in ./.local/lib/python3.7/site-packages (from sparse-dot-topn) (0.29.26)
Building wheels for collected packages: sparse-dot-topn
  Building wheel for sparse-dot-topn (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/ec2-user/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpkxql22kh
       cwd: /tmp/pip-install-dr3dy2db/sparse-dot-topn_a4e8b8ecc1b44350860d0dcdde789cf0
  Complete output (27 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/sparse_dot_topn
  copying sparse_dot_topn/__init__.py -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  copying sparse_dot_topn/awesome_cossim_topn.py -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  running egg_info
  writing manifest file 'sparse_dot_topn.egg-info/SOURCES.txt'
  copying sparse_dot_topn/array_wrappers.pxd -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  copying sparse_dot_topn/array_wrappers.pyx -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  copying sparse_dot_topn/sparse_dot_topn.pyx -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  copying sparse_dot_topn/sparse_dot_topn_parallel.h -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  copying sparse_dot_topn/sparse_dot_topn_source.h -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  copying sparse_dot_topn/sparse_dot_topn_threaded.pyx -> build/lib.linux-x86_64-3.7/sparse_dot_topn
  running build_ext
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/sparse_dot_topn
  /usr/local/bin/gcc-8 -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.7m -I/tmp/pip-build-env-6grtk5m0/normal/lib64/python3.7/site-packages/numpy/core/include -c ./sparse_dot_topn/array_wrappers.cpp -o build/temp.linux-x86_64-3.7/./sparse_dot_topn/array_wrappers.o -std=c++0x -pthread -O3
  /tmp/pip-build-env-6grtk5m0/normal/lib64/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-dr3dy2db/sparse-dot-topn_a4e8b8ecc1b44350860d0dcdde789cf0/sparse_dot_topn/array_wrappers.pxd
    tree = Parsing.p_module(s, pxd, full_module_name)
  /tmp/pip-build-env-6grtk5m0/normal/lib64/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-dr3dy2db/sparse-dot-topn_a4e8b8ecc1b44350860d0dcdde789cf0/sparse_dot_topn/sparse_dot_topn.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  /tmp/pip-build-env-6grtk5m0/normal/lib64/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-dr3dy2db/sparse-dot-topn_a4e8b8ecc1b44350860d0dcdde789cf0/sparse_dot_topn/sparse_dot_topn_threaded.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  error: command '/usr/local/bin/gcc-8' failed: No such file or directory: '/usr/local/bin/gcc-8'
  ----------------------------------------
  ERROR: Failed building wheel for sparse-dot-topn
Failed to build sparse-dot-topn
ERROR: Could not build wheels for sparse-dot-topn, which is required to install pyproject.toml-based projects
EN

回答 1

Stack Overflow用户

发布于 2022-02-06 12:56:07

对我来说,起作用的是确保numpy版本为1.19.5。还确保按照正式文档安装cython。

代码语言:javascript
复制
pip install cython
pip install numpy==1.19.5
pip install sparse-dot-topn
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70754148

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档