clj-python / clj-python/libpython-clj

Failed to load library on Windows (:libnames construction)

Aberta
#140 5 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
Clojure
Estrelas
1.2k
Forks
74
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

libpython-load-fail-edn.txt

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece em src/libpython_clj/python/interpreter.clj, por volta da linha 86, onde python-library-regex é mencionado, e reproduza isso com o phil project usando o comando do Windows mostrado e o EDN de depuração anexado. Rastreie os :libnames gerados e a falha ao carregar a biblioteca. Está concluído quando o Python inicializar com sucesso no Windows sem o erro Failed to load library.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
clojure, python
Domínio
backend, operating-systems
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
42/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.