Skip to content

Failed to find a valid python library on MS-Windows with the official python distributions #246

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

Closed
ikappaki opened this issue Jul 11, 2023 · 0 comments · Fixed by #247
Closed

Comments

@ikappaki
Copy link
Contributor

libpython-clj can't find the python dll on MS-Windows:

Execution error at libpython-clj2.python/initialize! (python.clj:129).
Failed to find a valid python library!

Steps to reproduce.

  1. Download and install python 3.11 for MS-Windows from https://www.python.org/downloads/
  2. Create a deps.edn adding libpython-clj as a dep
{:deps {clj-python/libpython-clj {:mvn/version "2.024"}}}
  1. Bring up the REPL
> clojure
Clojure 1.11.1
user=> 
  1. Try to load libpython-clj, you should get the above error
user=> (require 'libpython-clj2.require)
 clojure.tools.logging$eval667$fn__670 invoke
INFO: Detecting startup info
clojure.tools.logging$eval667$fn__670 invoke
INFO: Startup info {:lib-version "3.11", :java-library-path-addendum "C:\\local\\Python311\\lib", :exec-prefix "C:\\local\\Python311", :executable "C:\\local\\Python311\\python.exe", :libnames ("python3.11m" "python3.11"), :prefix "C:\\local\\Python311", :base-prefix "C:\\local\\Python311", :libname "python3.11m", :base-exec-prefix "C:\\local\\Python311", :python-home "C:\\local\\Python311", :version [3 11 4], :platform "win32"}
 clojure.tools.logging$eval667$fn__670 invoke
INFO: Prefixing java library path: C:\local\Python311\lib
Execution error at libpython-clj2.python/initialize! (python.clj:129).
Failed to find a valid python library!

This is because the python dll filename on the official distributions do not include a . between major and minor strings.

PR to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant