Skip to content

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

Closed

Description

@ikappaki

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions