clj-python / clj-python/libpython-clj
Failed to load library on Windows (:libnames construction)
Personne n'a encore pris cette issue.
- Langage dominant
- Clojure
- Étoiles
- 1.2k
- Forks
- 74
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I'm just starting to try to use this amazing project. I'm trying to do everything in windows for project-specific reasons. I could be missing something obvious because I lack experience developing clojure/java/python on windows, but it appears to me that the issue is with https://github.com/clj-python/libpython-clj/blob/master/src/libpython_clj/python/interpreter.clj#L86 python-library-regex not actually being used (the one call to it being commented out). I could try hacking it into place and submitting a PR, but I assume there's a good reason it's not currently in there. Please advise!
My bare stub of a project is at https://github.com/momerath42/phil for reproduction's sake. Attached is the debug .edn file, and here is the output at the [power]shell:
PS E:\full melon\phil> clj -X phil.core/-main
2020-12-06T23:19:02.336Z VennstationOne INFO [phil.core:10] - using config file: E:\full melon\phil\config_phil.edn
2020-12-06T23:19:02.373Z VennstationOne INFO [phil.core:27] - Hi, I'm PHIL!
2020-12-06T23:19:02.374Z VennstationOne INFO [phil.core:28] - my current working directory is (maybe): E:\full melon\phil
2020-12-06T23:19:02.374Z VennstationOne INFO [phil.core:29] - I slurped this config: {:listens {:python-executable "c:\\Users\\micha\\anaconda3\\python.exe", :library-path "c:\\Users\\micha\\anaconda3", :windows-anaconda-activate-bat "c:\\Users\\micha\\anaconda3\\condabin\\activate.bat"}}
2020-12-06T23:19:02.376Z VennstationOne INFO [phil.listens:10] - listens/start-listening cfg: {:python-executable "c:\\Users\\micha\\anaconda3\\python.exe", :library-path "c:\\Users\\micha\\anaconda3", :windows-anaconda-activate-bat "c:\\Users\\micha\\anaconda3\\condabin\\activate.bat"}
Dec 06, 2020 3:19:02 PM clojure.tools.logging$eval4632$fn__4635 invoke
INFO: Executing python initialize with options:{:python-executable "c:\\Users\\micha\\anaconda3\\python.exe", :program-name nil, :python-home nil, :library-path "c:\\Users\\micha\\anaconda3"}
Dec 06, 2020 3:19:02 PM clojure.tools.logging$eval4632$fn__4635 invoke
INFO: Detecting startup-info for Python executable: c:\Users\micha\anaconda3\python.exe
Dec 06, 2020 3:19:02 PM clojure.tools.logging$eval4632$fn__4635 invoke
INFO: Startup info detected:
{:lib-version "3.8",
:java-library-path-addendum "c:\\Users\\micha\\anaconda3\\lib",
:exec-prefix "c:\\Users\\micha\\anaconda3",
:executable "c:\\Users\\micha\\anaconda3\\python.exe",
:libnames ("c:\\Users\\micha\\anaconda3" "python3.8"),
:prefix "c:\\Users\\micha\\anaconda3",
:base-prefix "c:\\Users\\micha\\anaconda3",
:base-exec-prefix "c:\\Users\\micha\\anaconda3",
:python-home "c:\\Users\\micha\\anaconda3",
:version [3 8 5],
:platform "win32"}
Dec 06, 2020 3:19:02 PM clojure.tools.logging$eval4632$fn__4635 invoke
INFO: Trying python library names ["c:\\Users\\micha\\anaconda3" "c:\\Users\\micha\\anaconda3" "python3.8" "python3.7m" "python3.6m"]
Dec 06, 2020 3:19:02 PM clojure.tools.logging$eval4632$fn__4635 invoke
INFO: Setting java library path: c:\Users\micha\anaconda3\lib:C:\Users\micha\scoop\apps\adoptopenjdk-lts-hotspot\current\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Users\micha\scoop\apps\adoptopenjdk-lts-hotspot\current\bin;C:\Users\micha\scoop\shims;C:\Program Files\Oculus\Support\oculus-runtime;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files (x86)\ZED SDK\dependencies\freeglut_2.8\x64;C:\Program Files (x86)\ZED SDK\dependencies\glew-1.12.0\x64;C:\Program Files (x86)\ZED SDK\dependencies\opencv_3.1.0\x64\vc14\bin;C:\Program Files (x86)\ZED SDK\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Users\micha\AppData\Local\Microsoft\WindowsApps;C:\Users\micha\AppData\Local\GitHubDesktop\bin;C:\Users\micha\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Imaginando\UBRIDGE;C:\Users\micha\AppData\Local\Programs\Microsoft VS Code\bin;.
Dec 06, 2020 3:19:02 PM clojure.tools.logging$eval4632$fn__4635 invoke
INFO: Reference thread starting
Execution error (ExceptionInfo) at tech.v3.jna.base/do-load-library (base.clj:157).
Failed to load library
Full report at:
C:\Users\micha\AppData\Local\Temp\clojure-15358896831604690969.edn
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez dans src/libpython_clj/python/interpreter.clj, vers la ligne 86, où python-library-regex est mentionné, et reproduisez le problème avec le phil project en utilisant la commande Windows indiquée et l’EDN de débogage jointe. Suivez les :libnames générés et l’échec du chargement de la bibliothèque. C’est terminé lorsque Python s’initialise correctement sous Windows sans l’erreur Failed to load library.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- clojure, python
- Domaine
- backend, operating-systems
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100