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

pip install, error building wheel for annoy #296

Open
jdmoore7 opened this issue Jun 13, 2019 · 3 comments
Open

pip install, error building wheel for annoy #296

jdmoore7 opened this issue Jun 13, 2019 · 3 comments

Comments

@jdmoore7
Copy link

Hi team, this looks an incredible tool and I'm really looking forward to using it.

I've tried pip install skills-ml and it almost works, up until it tries to build a wheel for the package, annoy, at which point the installation runs into a fatal error and quits. I've installed annoy separately without any issues, however, pip3 does not seem to be able to locate this when attempting to install skills-ml.

Is there a precompiled version of skills-ml available, dependencies and all?

`Building wheels for collected packages: annoy
Building wheel for annoy (setup.py) ... error
ERROR: Complete output from command /anaconda3/bin/python -u -c 'import setuptools, tokenize;file='"'"'/private/var/folders/rb/qs7xx8rs633bk4njyk_6t7bh0000gn/T/pip-install-mny_24jd/annoy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/rb/qs7xx8rs633bk4njyk_6t7bh0000gn/T/pip-wheel-syznr8jl --python-tag cp36:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/annoy
copying annoy/init.py -> build/lib.macosx-10.7-x86_64-3.6/annoy
running build_ext
building 'annoy.annoylib' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/anaconda3/include/python3.6m -c src/annoymodule.cc -o build/temp.macosx-10.7-x86_64-3.6/src/annoymodule.o -O3 -ffast-math -fno-associative-math -march=native
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from src/annoymodule.cc:15:
src/annoylib.h:20:10: fatal error: 'string' file not found
#include
^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for annoy
`

@nickcastro
Copy link

I experienced the same error and was able to get this to work. The issue is that the required dependency is listed as Annoy 1.14.0 which I guess no longer has the whl file to build from in pypi. When you separetely installed annoy, you probably installed 1.16.0 which installs correctly. To allow for this project to install, I downloaded the repo and changed the Annoy dependency version and then installed the local copy. I'm not sure yet if updating this package will break other things but doing so will resolve that error.

@beingkk
Copy link

beingkk commented Nov 11, 2019

I had the same problem, and I can confirm that @nickcastro suggestion worked for me as well, and after running pip install . in the project folder, the package was successfully installed. Thanks!

Also note that the requirements appear to be missing wrapt package, which was required once I tried from skills_ml.ontologies.onet import Onet. This can, however, be easily fixed.

@ChelseaCHENX
Copy link

I have the same problem, but due to gcc version.
I did

yum install centos-release-scl
yum install devtoolset-7-gcc*
scl enable devtoolset-7 bash
which gcc
gcc --version

then pip install . again and it is solved :)

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

4 participants