Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing sparse-dot-topn on AWS EC2- ERROR: Could not build wheels for sparse-dot-topn, which is required to install pyproject.toml-based projects #62

Closed
shivamsharma612Git opened this issue Jan 18, 2022 · 2 comments

Comments

@shivamsharma612Git
Copy link

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: setuptools>=42 in ./.local/lib/python3.7/site-pac kages (from sparse_dot_topn) (60.5.0)
Requirement already satisfied: numpy>=1.16.6 in ./.local/lib/python3.7/site-pack ages (from sparse_dot_topn) (1.20.3)
Requirement already satisfied: scipy>=1.2.3 in ./.local/lib/python3.7/site-packa ges (from sparse_dot_topn) (1.6.3)
Requirement already satisfied: cython>=0.29.15 in ./.local/lib/python3.7/site-pa ckages (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/p ip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpsqeow2xi
cwd: /tmp/pip-install-3kouctum/sparse-dot-topn_ffa1c91045c5482783ba4782ee f10139
Complete output (31 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_t opn
copying sparse_dot_topn/awesome_cossim_topn.py -> build/lib.linux-x86_64-3.7/s parse_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/spars e_dot_topn
copying sparse_dot_topn/array_wrappers.pyx -> build/lib.linux-x86_64-3.7/spars e_dot_topn
copying sparse_dot_topn/sparse_dot_topn.pyx -> build/lib.linux-x86_64-3.7/spar se_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
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp ,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-si ze=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.7m -I/tmp/pip-build-env-ma639yg5/normal/lib64/python3.7/ site-packages/numpy/core/include -c ./sparse_dot_topn/array_wrappers.cpp -o buil d/temp.linux-x86_64-3.7/./sparse_dot_topn/array_wrappers.o -std=c++0x -pthread - O3
./sparse_dot_topn/array_wrappers.cpp:6:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
/tmp/pip-build-env-ma639yg5/normal/lib64/python3.7/site-packages/Cython/Compil er/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-3ko uctum/sparse-dot-topn_ffa1c91045c5482783ba4782eef10139/sparse_dot_topn/array_wra ppers.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
/tmp/pip-build-env-ma639yg5/normal/lib64/python3.7/site-packages/Cython/Compil er/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-3ko uctum/sparse-dot-topn_ffa1c91045c5482783ba4782eef10139/sparse_dot_topn/sparse_do t_topn.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
/tmp/pip-build-env-ma639yg5/normal/lib64/python3.7/site-packages/Cython/Compil er/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-3ko uctum/sparse-dot-topn_ffa1c91045c5482783ba4782eef10139/sparse_dot_topn/sparse_do t_topn_threaded.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
error: command '/usr/bin/gcc' failed with exit code 1

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

Tried everything available online but it is not working.

@ymwdalex
Copy link
Collaborator

@shivamsharma612Git

Thanks for the feedback! We just released v0.3.3. We employed Github actions and CiBuildWheel, and make the wheels available for Py3.6-3.10 on multiple architectures of Linux, MacOS and Windows.

If you still have installation problems, please try the latest version.

If you find any problem with v0.3.3, please let us know. Thanks!

@ymwdalex
Copy link
Collaborator

ymwdalex commented Jul 1, 2022

v0.3.3 should fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants