Comments (11)
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-x50Fzy/implicit/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-02U13x-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.11-intel-2.7
creating build/lib.macosx-10.11-intel-2.7/implicit
copying implicit/__init__.py -> build/lib.macosx-10.11-intel-2.7/implicit
copying implicit/als.py -> build/lib.macosx-10.11-intel-2.7/implicit
copying implicit/nearest_neighbours.py -> build/lib.macosx-10.11-intel-2.7/implicit
copying implicit/recommender_base.py -> build/lib.macosx-10.11-intel-2.7/implicit
copying implicit/utils.py -> build/lib.macosx-10.11-intel-2.7/implicit
running build_ext
building 'implicit._als' extension
creating build/temp.macosx-10.11-intel-2.7
creating build/temp.macosx-10.11-intel-2.7/implicit
g++-7 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c implicit/_als.cpp -o build/temp.macosx-10.11-intel-2.7/implicit/_als.o -Wno-unused-function -Wno-maybe-uninitialized -O3 -ffast-math -fopenmp
g++-7: warning: x86_64 conflicts with i386 (arch flags ignored)
g++-7: error: unrecognized command line option '-Wshorten-64-to-32'
error: command 'g++-7' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-x50Fzy/implicit/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-02U13x-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-x50Fzy/implicit/
I have this error with GCC. Without GCC it works just fine.
from implicit.
Looks like I messed up on the install script =( will see about fixing tonight
As a short term hack to install, you can go 'cython implicit/_implicit.pyx' to generate the _implicit.c file, and then you should be able to install from source.
from implicit.
We've tweaked the install script here recently - the compiled _implicit.c file is checked in, and I've changed the setup.py script to not require an openmp compatible compiler (if will just log an warning if it can't find one instead).
I think these issues should be resolved with these changes
from implicit.
Hello @benfred, I still got error after doing cython implicit/_implicit.pyx
follows by python setup.py install
as follows:
...
building 'implicit._implicit' extension
gcc-6 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/Users/titipat/anaconda3/include/python3.5m -c implicit/_implicit.c -o build/temp.macosx-10.5-x86_64-3.5/implicit/_implicit.o -fopenmp -ffast-math
gcc-6: error: unrecognized command line option '-Qunused-arguments'; did you mean '-Wunused-argument'?
gcc-6: error: unrecognized command line option '-Qunused-arguments'; did you mean '-Wunused-argument'?
error: command 'gcc-6' failed with exit status 1
(I'm on Mac OSX also)
from implicit.
@titipata Can you run this to see what the build flags are in your python install?
python -c 'import sysconfig; print(sysconfig.get_config_var("CFLAGS"))'
It should print out something like:
-fno-strict-aliasing -I/Users/ben/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
I think maybe the CFLAGS in your python install are messed up somehow. You can try to fix by tweaking the ' _sysconfigdata.py' file in your python library.
from implicit.
@benfred, here is an output when I run following command.
-fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/titipat/anaconda3/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/Users/titipat/anaconda3/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk
Here is output when I run gcc --version
(installed with homebrew
).
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I will thoroughly check what's the exact problem that I have.
from implicit.
I guess the problem may sloved after you running brew install gcc --without-multilib
.
I try to run pip install implicit
with gcc install by brew install gcc
, but failed.
OpenMP has conflict with multilib, so you should install gcc by brew install gcc --without-multilib
Good luck!
from implicit.
Hi @benfred
Thanks for this great package.
I tried to build the package and failed. I'm getting the same error as @titipata.
$ python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to implicit.egg-info/requires.txt
writing implicit.egg-info/PKG-INFO
writing top-level names to implicit.egg-info/top_level.txt
writing dependency_links to implicit.egg-info/dependency_links.txt
reading manifest file 'implicit.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'implicit.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-x86_64/egg
running install_lib
running build_py
running build_ext
building 'implicit._als' extension
creating build/temp.macosx-10.7-x86_64-2.7
creating build/temp.macosx-10.7-x86_64-2.7/implicit
g++-6 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/Users/imris/anaconda/envs/implicit/include/python2.7 -c implicit/_als.cpp -o build/temp.macosx-10.7-x86_64-2.7/implicit/_als.o -Wno-unused-function -Wno-maybe-uninitialized -O3 -ffast-math -fopenmp
g++-6: error: unrecognized command line option '-Qunused-arguments'; did you mean '-Wunused-argument'?
g++-6: error: unrecognized command line option '-Qunused-arguments'; did you mean '-Wunused-argument'?
error: command 'g++-6' failed with exit status 1
I re-installed gcc using brew install gcc --without-multilib
as suggested by @LanceVan, but it didn't solve the problem.
Any suggestions?
Thanks
$ python -c 'import sysconfig; print(sysconfig.get_config_var("CFLAGS"))'
-fno-strict-aliasing -I/Users/imris/anaconda/envs/implicit/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
from implicit.
I don't know where those flags could be coming from - there are valid for Clang but not for GCC. =(
I thought that the flags get imported from the sysconfig.get_config_var("CFLAGS") setting in your python distribution - but it doesn't look that for your (the compile flags you printed out aren't included, and the incorrect ones are there instead). Maybe you can add a line to the setup.py file to go like 'import sysconfig; print(sysconfig.get_config_var("CFLAGS"))' just to make sure that this works.
Alternatively, if you uninstall the GCC compiler from brew (or comment out the 'set_gcc' function in setup.py) this should skip trying to find an openmp compiler and go with clang instead - which should work, just be single threaded
from implicit.
Hello @benfred, I'm trying to install the library but I am running into a similar error. The first time I tried installing the library I typed the given command line from the documentation "pip install implicit". A window then popped up asking me to if I would like to install gcc for the library in which I clicked install. This eventually gave me an error that came with a bunch of disable code and a gcc error.
I then try to install the library by cloning and I still get the following error stating that a random file is not found. Any thoughts on what I can do to fix this?
EDIT: It seems the way i installed gcc did not cut it. It had to be installed through homebrew.
Thanks
running install
running bdist_egg
running egg_info
writing implicit.egg-info/PKG-INFO
writing dependency_links to implicit.egg-info/dependency_links.txt
writing requirements to implicit.egg-info/requires.txt
writing top-level names to implicit.egg-info/top_level.txt
reading manifest file 'implicit.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'examples'
writing manifest file 'implicit.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-x86_64/egg
running install_lib
running build_py
running build_ext
building 'implicit.bpr' extension
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda/include -arch x86_64 -I/anaconda/include -arch x86_64 -I/anaconda/include/python3.6m -c implicit/bpr.cpp -o build/temp.macosx-10.7-x86_64-3.6/implicit/bpr.o -Wno-unused-function -Wno-maybe-uninitialized -O3 -ffast-math -std=c++11
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]
implicit/bpr.cpp:534:10: fatal error: 'random' file not found
#include
^
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
from implicit.
@oppaquan I was getting this same error. Upgrading my OS (mac) fixed it. Basically my LLVM and clang where not up-to-date.
from implicit.
Related Issues (20)
- numpy has teriminated the `get_info` method HOT 4
- Evaluation module not working HOT 1
- Adding `numpy` to `requirements.txt`
- pip install implicit is not work to use GPU HOT 3
- Incremental update with old users but new items HOT 4
- als explain method bug HOT 1
- Usage of the trained model on testing.
- ranking metrics fail when model trained on CPU but not GPU?; implicit 0.7.2 HOT 1
- Python issue HOT 4
- Is it possible to compare scores across multiple results?
- function get_lastfm() error
- getting index error while using recommend function while ALS algorithm
- What is a good enough Precision@K and MAP@K value?
- BPR results not reproducible using multiple threads
- gpu issue on colab (implicit==0.7.2 / cuda ==12.1) HOT 1
- Potential error in the calculation of precision@k HOT 2
- Early stopping for ALS
- How recommend method works in Nearest Neighbour Models? HOT 3
- Potential bug in calculation of gradient updates for BPR
- IMPLICIT: No CUDA extension has been built, can't train on GPU HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from implicit.