Skip to content

Cannot install SnakeCharmR #44

Description

@mohzhang

run
SNAKECHARMRPYTHON_PYTHON_VERSION=3.6 R -e 'install.packages("SnakeCharmR", repos="http://cran.us.r-project.org")'
has python3.6 and python3.6-config in the PATH
but seeing:

  • installing source package ‘SnakeCharmR’ ...
    ** package ‘SnakeCharmR’ successfully unpacked and MD5 sums checked
    Using python-config...
    Found Python version 3.6...
    configure: creating ./config.status
    config.status: creating src/Makevars
    --------[begin src/Makevars]--------

Required vars

PKG_LIBS=-lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
PKG_CPPFLAGS=-I/usr/include/python2.7 -I/usr/include/python2.7 -D PYTHONLIBFILE="libpython3.6.so"
CXX_STD = CXX11

Final got error:
** testing if installed package can be loaded
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python2.7/json/init.py", line 108, in
from .decoder import JSONDecoder
File "/usr/lib64/python2.7/json/decoder.py", line 5, in
import struct
File "/usr/lib64/python2.7/struct.py", line 1, in
from _struct import *
ImportError: /usr/lib64/python2.7/lib-dynload/_struct.so: undefined symbol: PyString_FromStringAndSize
Error: package or namespace load failed for ‘SnakeCharmR’:
.onAttach failed in attachNamespace() for 'SnakeCharmR', details:
call: py.get("sys.version")
error: Traceback (most recent call last):
File "", line 3, in
NameError: name 'json' is not defined

Error: loading failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions