gasevi / pyreclab

pyRecLab is a library for quickly testing and prototyping of traditional recommender system methods, such as User KNN, Item KNN and FunkSVD Collaborative Filtering. It is developed and maintained by Gabriel Sepúlveda and Vicente Domínguez, advised by Prof. Denis Parra, all of them in Computer Science Department at PUC Chile, IA Lab and SocVis Lab.
GNU General Public License v3.0
122 stars 28 forks source link

Issue with cmake python paths on OSX #11

Closed fariquelme closed 7 years ago

fariquelme commented 7 years ago

I had problems when trying to compile the library, probably because i installed python3 with Homebrew.

Adding this lines to CMakeLists.txt before find_package fixed the problem:

SET(PYTHON_INCLUDE_PATH /usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/include/python3.5m) SET(PYTHON_LIBRARIES /usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5m.so) SET(PYTHON_EXECUTABLE /usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/bin/python3.5m) SET(PYTHON_INCLUDE_DIR /usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/include/python3.5m)

gasevi commented 7 years ago

Hi fariquelme,

most of the time I've seen this problem, the cause is related with differences between python-dev version and the selected version number in CMake. In fact, the script looks for the library in the root path that you have included in your workarround. Now, I'm working in a distribution method based on wheels, in order to users can install pyreclab through pip, avoiding compilation issues.

Regards,

GSV.