-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using pyenv breaks PythonCall #318
Comments
How did you install the version of Python you are trying to use? From the logs you've sent, it's a statically linked build of Python which is unfortunately not supported by PythonCall (because it needs to dynamically link to libpython). Often this is the case for Python bundled in system package managers. |
I manage installed Python versions using |
Ah, I didn't realise pyenv builds Python for you. Looks like you can get it to build the shared library here: https://github.com/pyenv/pyenv/blob/master/plugins/python-build/README.md#building-with---enable-shared |
Just realized I forgot to circle back to this -- that workaround does enable PythonCall.jl to work with a |
Affects: PythonCall
Describe the bug
After setting up a local Python version using
pyenv
, creating a virtual environment, and setting up PythonCall to use that venv instead of Conda, PythonCall can't be loaded:The files referenced in the error message do exist.
Steps to reproduce
pyenv local x.x
# I used 3.9 to disambiguate from my default system Python, which is 3.10.venv
using the tool of your choice (I tested with Poetry and venv)] activate .
> ENV["JULIA_CONDAPKG_BACKEND"]="Null"
# don't use Conda> ENV["JULIA_PYTHONCALL_EXE"]=".venv/bin/python3"
# point PythonCall to the venv python] add PythonCall
> using PythonCall
My system
Additional context
If I instead use
poetry
to specify a Python version for the virtual environment, and then do the above steps without usingpyenv
, then PythonCall works as expected.The text was updated successfully, but these errors were encountered: