I am using Python for making a script to work with some chemical structures
in my PhD. I want to install openbabel libraries for python. I tried my best
but I could not install it on Windows. I posted a question earlier about
installing it on Windows at
http://stackoverflow.com/questions/42151301/how-do-i-install-openbabel-for-python-3-6-in-windows-10/42151551?noredirect=1#comment71470260_42151551
but could not find a solution. The solution installed the library but it
does not work and could not connect to SWIG.
No I am trying to install it on my office computer which is a mac for past 5
hours but I could not figure what is going on.
I tried to install it from source code of Openbabel and link it with python3
but it is making problem.
If I use the following command:

 `cmake ../ -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON`

It successfully links it to Python 2.7 which I do not want. When I try the
following options, it gives the error shown below:

`cmake ../ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_BINDINGS=ON
-DRUN_SWIG=ON`

OR

`cmake ../ -DRUN_SWIG=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
-DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m
-DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5m.dylib
-DPYTHON_BINDINGS=ON`

It gives the following error at the end after a lot of successful output:

    -- Found PythonInterp: /usr/bin/python3.6 (found version "1.4") 
    -- Found SWIG: /usr/local/bin/swig (found version "3.0.12") 
    -- Found SWIG: /usr/local/bin/swig (found suitable version "3.0.12",
minimum required is "2.0") 
    -- Found PythonLibs:
/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6m.dylib
(found version "3.6.0") 
    -- Python bindings will be compiled
    CMake Error at scripts/CMakeLists.txt:120 (install):
    install TARGETS given no LIBRARY DESTINATION for module target
    "bindings_python".
    CMake Error at scripts/CMakeLists.txt:123 (install):
    install FILES given no DESTINATION!
    CMake Error at scripts/CMakeLists.txt:126 (install):
    install FILES given no DESTINATION!
    -- Configuring incomplete, errors occurred!
    See also
"/usr/local/Cellar/obabel/openbabel-master/ali/CMakeFiles/CMakeOutput.log".
    See also
"/usr/local/Cellar/obabel/openbabel-master/ali/CMakeFiles/CMakeError.log".


I am not sure why It detects the Python as v1.4 `-- Found PythonInterp:
/usr/bin/python3.6 (found version "1.4") ` instead of finding v.3.5.
I tried all the procedure with python 3.6 as well but the same errors occur.
I am also using the openbabel obtained from github which was said to be
working with these commands at the following post:
http://forums.openbabel.org/OpenBabel-for-Python-3-td4659432.html
But it doesn't work as well.
Please help me as I require this module for my research.
Thanks



--
View this message in context: 
http://forums.openbabel.org/How-to-Install-openbabel-for-Python-3-6-on-macOS-Sierra-10-12-3-tp4659726.html
Sent from the General discussion mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to