When I was trying to import modules like "pymc3" or "theano", the rPython or PythoninR are not able to locate these modules even though I have already installed them. I am using Ubuntu 16.04, R 3.4.2, and python 3.5.2
It seems like these two packages fail to locate a certain folder, but it doesn't work after I append the path into sys.path, which contains all the packages I need, by using this command:
pyExec("sys.path.append('/home/lijiakai/.local/lib/python3.5/site-packages')")
Result also seems like good:
pyExec('import sys; print(sys.path)')
['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages', '.', '/home/lijiakai/.local/lib/python3.5/site-packages']
I imported the packages:
pyExec('import pymc3')
Then received the following errors:
Traceback (most recent call last): File "<string>", line 1, in
<module> **ImportError** : No module named 'pymc3' Error in
pyExec("import pymc3") : An error has occured while executing
Python code. See traceback above.
Totally got me crazy ... really appreciate if anyone can help me out here. Thanks
system("which python")
return? - clemenslibrary(rPython)
python.exec(c("import sys", "\n", "print(sys.version)"))
return? I suspect that rPython is using another Python version, not 3.5.2 - clemens