Closed vxe closed 3 years ago
Nothing is cached but we have a bit of code that is meant to detect the python version that appears to be failing.
It appears detect-startup-info is not working for you. What happens when you call this from the REPL?
detect-startup-info
seems to returning 3.6 as a default
user> (libpython-clj.python.interpreter/detect-startup-info {})
{:python-home "/Library/Frameworks/Python.framework/Versions/3.6",
:lib-version "3.6",
:libname "python3.6m",
:java-library-path-addendum
"/Library/Frameworks/Python.framework/Versions/3.6/lib"}
when called with :python-executable
for 3.9, its seems to spit out the right path for the dylib
user> (libpython-clj.python.interpreter/detect-startup-info {:python-executable "/usr/local/Cellar/python@3.9/3.9.0_2/bin/python3.9"})
{:python-home
"/usr/local/Cellar/python@3.9/3.9.0_2/Frameworks/Python.framework/Versions/3.9",
:lib-version "3.9",
:libname "python3.9m",
:java-library-path-addendum
"/usr/local/Cellar/python@3.9/3.9.0_2/Frameworks/Python.framework/Versions/3.9/lib"}
Well, the quick work around is to provide :python-executable to initialize! and be sure to be the first one to call initialize. What happens if you attempt to tell the system exactly were the python executable is that you want it to use to setup it's library paths?
Might be related to the calling of python3-config --prefix
as mentioned here , which points to 3.6
╰─➛ python3-config --prefix
/Library/Frameworks/Python.framework/Versions/3.6
there appears to be additional version specific commands now
╰─➛ python3.9-config --prefix
/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9
similar story for the python3 executable
─➛ python3 --version && python3.9 --version
Python 3.6.8
Python 3.9.0
^^ fixed the above with brew cleanup && brew reinstall python@3.9
, detect-startup-info
now spits out the right values
user> (libpython-clj.python.interpreter/detect-startup-info {})
{:python-home
"/usr/local/Cellar/python@3.9/3.9.0_2/Frameworks/Python.framework/Versions/3.9",
:lib-version "3.9",
:libname "python3.9m",
:java-library-path-addendum
"/usr/local/Cellar/python@3.9/3.9.0_2/Frameworks/Python.framework/Versions/3.9/lib"}
however importing require-python
still fails on attempting to load version 3.6 like in earlier screenshot, I think because of this bare call to (py/initialize!)
I see there was issue with the pyregex creation in version 3.8 , I am seeing a different failure related to a potential platform key name issue
user> (libpython-clj.python.interpreter/python-library-regex (libpython-clj.python.interpreter/python-system-info "/usr/local/bin/python3"))
Execution error (IllegalArgumentException) at libpython-clj.python.interpreter/python-library-regex (interpreter.clj:91).
No matching clause: :darwin
Does your PR completely address this issue for you?
yeah my issue seems to be resolved, I can now load require-python
without any exceptions
OK, great closing :-).
@cnuernber is a new version with the changes going to be pushed to be pushed soon? I'm using a local jar for testing but would more convenient to pull from clojars. thanks
For sure.
2.00-alpha-6
is up.
Here's the interaction
Its not clear to me why its trying to use 3.6 but I think the bug didn't surface before because the 3.6 dylib was still on disk, but homebrew decided it was time to delete it after the last run of
brew update
Is there something cached that's I need to delete to get it to recognize my 3.9 install?