clj-python / libpython-clj

Python bindings for Clojure
Eclipse Public License 2.0
1.08k stars 68 forks source link

newbie: I get: `dir already refers to: #'clojure.repl/dir in namespace: user` #238

Closed TheJoeSchr closed 1 year ago

TheJoeSchr commented 1 year ago

hi, I'm failing in the steps between Installation and Initilization from Usage document. Namely how to actually run this thing.

my steps so far:

(require '[libpython-clj2.python
                 :refer [as-python as-jvm
                         ->python ->jvm
                         get-attr call-attr call-attr-kw
                         get-item initialize!
                         run-simple-string
                         add-module module-dict
                         import-module
                         python-type
                         dir]
                 :as py])

then I get this error: image

I'm sure it's something pretty basic, but I'm quite new to clojure. I read "Brave Clojure" and wrote some scripts using bb. Now I wanted to use this project together with clerk to call some python code but not having to use jupyter. But it seems I failed at the first step. Any help appreciated!

jjtolton commented 1 year ago

@TheJoeSchr you can just remove dir from the requirements. See if that works as a short term solution.

TheJoeSchr commented 1 year ago

@jjtolton Thanks a lot for the fast response. Works perfectly.