unable to install PythonInR in linux

Create issue
Issue #17 open
wysh1989 created an issue

I am trying to install PythonInR from the zip file as my work linux environment does not have access to the internet. Here is the problem:

devcxsl004{venukond}/u1/venukond/py35/venv=> R CMD INSTALL --library=~/temp ~/temp/PythonInR_0.1-3.tar.gz
* installing *source* package 'PythonInR' ...
** package 'PythonInR' successfully unpacked and MD5 sums checked
3.5
/u1/venukond/py35/venv/bin
0

python version is > 3
./configure: line 40: /u1/venukond/py35/venv/bin/python3.5-config: No such file or directory
./configure: line 41: /u1/venukond/py35/venv/bin/python3.5-config: No such file or directory

Makevars:
PKG_LIBS=
PKG_CFLAGS= -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING

** libs
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c CToR.c -o CToR.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c CastPyObjects.c -o CastPyObjects.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c CastRObjects.c -o CastRObjects.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c GetPyObjects.c -o GetPyObjects.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c PyCall.c -o PyCall.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c PyRunString.c -o PyRunString.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c PythonFunctions.c -o PythonFunctions.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c PythonInR.c -o PythonInR.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c Python_Explicit_Linking.c -o Python_Explicit_Linking.o
/usr/bin/gcc -std=gnu99 -I/usr/local/R/3.2.3/lib64/R/include -DNDEBUG -D PYTHONLIBXY=libpython3.5m.so -D PYTHON_IN_R_NO_EXPLICIT_LINKING -fpic -m64 -c SetPyObjects.c -o SetPyObjects.o
/usr/bin/gcc -std=gnu99 -shared -L/usr/local/R/3.2.3/lib64/R/lib -Wl,--enable-new-dtags -Wl,-L/usr/local/R/3.2.3/lib64/R/lib -Wl,-R/usr/local/R/3.2.3/lib64/R/lib -o PythonInR.so CToR.o CastPyObjects.o CastRObjects.o GetPyObjects.o PyCall.o PyRunString.o PythonFunctions.o PythonInR.o Python_Explicit_Linking.o SetPyObjects.o -L/usr/local/R/3.2.3/lib64/R/lib -lR
installing to /u1/venukond/temp/PythonInR/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
 unable to load shared object '/u1/venukond/temp/PythonInR/libs/PythonInR.so':
 /u1/venukond/temp/PythonInR/libs/PythonInR.so: undefined symbol: PyBool_Type
Error: loading failed
Execution halted
ERROR: loading failed

Please let me know how to get around this.I am using python3.5 and R3.2.23 Thank you.

Comments (8)

  1. wysh1989 reporter

    Hi Florian,

    Thank you for getting back . I have installed the header files. My installation failed much earlier when the headers were not there. Do you happen to know which exact header file has this symbol 'PyBool_Type' defined.I could start by trying to see if I have that file.

    Thank you.

  2. wysh1989 reporter

    My header files did have a problem.Was able to install after using the right header files. Closing the issue.Thanks Florian.

  3. wysh1989 reporter
    • changed status to open

    I was able to compile with python 2.6 but not with python 3.5.Is there anything I need to do?

  4. Log in to comment