mrkn / pycall.rb

Calling Python functions from the Ruby language
MIT License
1.06k stars 75 forks source link

PyCall::PythonNotFound (PyCall::PythonNotFound) #57

Closed tesths closed 6 years ago

tesths commented 6 years ago

I install python3.6 use

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install python3.6
sudo apt install libpython3.6

And I replace the default python version3.5. I install ruby use

sudo apt install ruby2.3 ruby2.3-dev

And when I use pycall, the error is finder.rb:37:inrescue in block in find_libpython': PyCall::PythonNotFound (PyCall::PythonNotFound)`

This error is appear also when I use pyenv to manage python version. Is there any function to solve it? I see #52 to set PYCALL_DEBUG_FIND_LIBPYTHON, but really don't how to set it.

And I also try #4 and this is the result after run python3 investigator.py

executable: /usr/bin/python3
exec_prefix: /usr
prefix: /usr
conda: false
multiarch: x86_64-linux-gnu
VERSION: 3.6
INSTSONAME: libpython3.6m.so.1.0
LIBRARY: libpython3.6m.a
LDLIBRARY: libpython3.6m.so
LIBDIR: /usr/lib
PYTHONFRAMEWORKPREFIX:
MULTIARCH: x86_64-linux-gnu

And my bashrc is set like

LIBPYTHON=/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1
PYTHON=/usr/bin/python3

Hope can get some help.

tesths commented 6 years ago

I think it must export to environment path. So all is done!