tatsy / lime

lime (Library for Image Editing)
http://tatsy.github.io/lime
MIT License
51 stars 16 forks source link

installation problem with python 3 #9

Closed crasse2 closed 3 years ago

crasse2 commented 3 years ago

Hi Tatsy ! your Lime tool seems really interesting and I wanted to try it out however I got some problem while trying to install it using python : when I run the cmake command provided in the help page (and replacing correctly the PYTHON_EXECUTABLE path I get this error message :

-- LIME v0.5.0
CMake Error at sources/python/pybind11/tools/FindPythonLibsNew.cmake:96 (message):
  Python config failure:

Call Stack (most recent call first):
  sources/python/pybind11/tools/pybind11Tools.cmake:16 (find_package)
  sources/python/pybind11/CMakeLists.txt:33 (include)

-- Configuring incomplete, errors occurred!
See also "/home/crasse/lime/build/CMakeFiles/CMakeOutput.log".

it refer to this part of the FindPythonLibsNew.cmake :

if(NOT _PYTHON_SUCCESS MATCHES 0)
    if(PythonLibsNew_FIND_REQUIRED)
        message(FATAL_ERROR
            "Python config failure:\n${_PYTHON_ERROR_VALUE}")
    endif()
    set(PYTHONLIBS_FOUND FALSE)
    set(PythonLibsNew_FOUND FALSE)
    return()
endif()

but I don't understand what it's looking for, I tried installing manually pybind11, and it installed correctly but still I can't install Lime.

do you have any idea of what's going on ?

tatsy commented 3 years ago

Can you elaborate on your environment? Which version do you use? Do you use conda/pyenv/etc.? What's your OS?

crasse2 commented 3 years ago

Hi Tasty, thanks for your answer,

I'm on Ubuntu 18.04, python 3 and anaconda 3 and usually install python library with pip

i got previously another message :

-- LIME v0.5.0
-- Found PythonInterp: /home/crasse/anaconda3/envs/lime/bin/python (found version "1.4") 
CMake Error at sources/python/pybind11/tools/FindPythonLibsNew.cmake:96 (message):
  Python config failure:

but the path "/home/crasse/anaconda3/envs/lime/bin/python" didn't exist, i got no "lime" folder in the envs folder of anaconda 3 so I don't understand how it can found anything in it ?

tatsy commented 3 years ago

I guess you followed the instruction in the following link, right? https://github.com/tatsy/lime/blob/master/docs/source/install.rst#python

If so, maybe the path /home/crasse/anaconda3/envs/lime/bin/python is the one you specified by yourself. Specifying the correct python path that you are actually using could solve the problem.

If not, please tell me what you did more elaborately including the commands you typed on the console. Thanks.

crasse2 commented 3 years ago

yeah I followed the instructions from the link, everything went well on the git clone and git submodule update. then creating the build folder and moving in it.

then I executed the command:

cmake -D LIME_BUILD_EXAMPLES=OFF \
      -D LIME_BUILD_TESTS=OFF \
      -D PYTHON_EXECUTABLE=/home/crasse/anaconda3/envs/lime/bin/python \
      -D LIME_BUILD_PYTHON_MODULE=ON ..

and got the error. and I'm pretty it comes frome the PYTHON_EXECUTABLE path as I don't understand the statement : " make sure the path to the python executable is specified to PYTHON_EXECUTABLE."

what is the "python executable" ?

what i'm sure of is that my anaconda 3 envs folder is "/home/crasse/anaconda3/envs/" , but there is no lime folder in it as i'm currently trying to install it. what is this path ? is it a path where the cmake command should find some file or is it a path where cmake should put or create some file ?

(sorry for the questions, i'm not that used to building and compiling stuff yet)

tatsy commented 3 years ago

Oh..., I understand. Python executable is python executable. The path should be /home/crasse/anaconda3/bin/python in your case. Maybe you can find an executable named python there.

It's very basic thing so you should google what the executable is.

crasse2 commented 3 years ago

Oh ! it worked, thanks a lot, yeah i'm starting with linux and graphical appplications so sometimes i'm stuck on simple things, thanks for your help !