Skip to content

Please comment how to fix the error : namespace 'libpython-clj2.metadata' not found #195

@madeinquant

Description

@madeinquant

Platform : OSX 11.6.3
Python : 3.9.10
JVM : openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 17.0.2+8-jvmci-22.0-b05)
OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 17.0.2+8-jvmci-22.0-b05, mixed mode, sharing)

When execute (require '[libpython-clj2.require :refer [require-python]]) in repl, encounter the following error

Syntax error compiling at (libpython_clj2/require.clj:1:1).
namespace 'libpython-clj2.metadata' not found

Reproduce the error

  1. create a testing project location with Lein:
    lien new libpython-clj-test

  2. Install the following to the project.clj :

(defproject libpython-clj-test "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.10.3"]
                 [clj-python/libpython-clj "2.017"]]
  :repl-options {:init-ns libpython-clj-test.core})

  1. run lein repl to install depending :
nREPL server started on port 55164 on host 127.0.0.1 - nrepl://127.0.0.1:55164
REPL-y 0.5.1, nREPL 0.8.3
Clojure 1.10.3
OpenJDK 64-Bit Server VM 17.0.2+8-jvmci-22.0-b05
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

libpython-clj-test.core=> (require '[libpython-clj2.python :as py :refer [py. py.. py.-]])
nil
libpython-clj-test.core=> (py/initialize!)
:already-initialized
libpython-clj-test.core=> (require '[libpython-clj2.require :refer [require-python]])
Syntax error compiling at (libpython_clj2/require.clj:1:1).
namespace 'libpython-clj2.metadata' not found

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