Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precompiling failed on raspberry pi #286

Open
KronosTheLate opened this issue Mar 27, 2023 · 4 comments
Open

Precompiling failed on raspberry pi #286

KronosTheLate opened this issue Mar 27, 2023 · 4 comments

Comments

@KronosTheLate
Copy link

[ Info: Precompiling PythonCall [6099a3de-0909-46bc-b1f4-468b9a2dfc0d]
    CondaPkg Found dependencies: /home/pi/.julia/packages/PythonCall/B5irB/CondaPkg.toml
ERROR: InitError: MicroMamba does not support your platform
during initialization of module C

I get this error during precompilation. I can do using PythonCall no problem, but get this error when trying to import something:

julia> pyimport("numpy")
ERROR: UndefRefError: access to undefined reference
Stacktrace:
 [1] PyUnicode_DecodeUTF8 at /home/pi/.julia/packages/PythonCall/B5irB/src/cpython/pointers.jl:290 [inlined]
 [2] pystr_fromUTF8(::Ptr{UInt8}, ::Int32) at /home/pi/.julia/packages/PythonCall/B5irB/src/concrete/str.jl:1
 [3] pystr_fromUTF8 at /home/pi/.julia/packages/PythonCall/B5irB/src/concrete/str.jl:2 [inlined]
 [4] pystr at /home/pi/.julia/packages/PythonCall/B5irB/src/concrete/str.jl:10 [inlined]
 [5] Py at /home/pi/.julia/packages/PythonCall/B5irB/src/Py.jl:138 [inlined]
 [6] macro expansion at /home/pi/.julia/packages/PythonCall/B5irB/src/Py.jl:128 [inlined]
 [7] pyimport(::String) at /home/pi/.julia/packages/PythonCall/B5irB/src/concrete/import.jl:11
 [8] top-level scope at REPL[15]:1

I get that this package is probably not made with the RPi in mind. But would it be possible to support it?

Version info:

julia> versioninfo()
Julia Version 1.5.3
Platform Info:
  OS: Linux (arm-linux-gnueabihf)
  CPU: unknown
  WORD_SIZE: 32
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, cortex-a72)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 
  JULIA_CONDAPKG_BACKEND = Null
@cjdoris
Copy link
Collaborator

cjdoris commented Mar 27, 2023

To use PythonCall on a platform not supported by MicroMamba, you'll need to install Python yourself somehow (I don't know anything about RPi) and configure PythonCall to use that installation. See here: https://cjdoris.github.io/PythonCall.jl/stable/pythoncall/#pythoncall-config

@KronosTheLate
Copy link
Author

I never saw this comment - my bad xD
This did indeed fix the problem! Is is possible to include this information in the precompilation error? Something like
"ERROR: InitError: MicroMamba does not support your platform during initialization of module C. If you have a working python installation, you can set ENV["JULIA_CONDAPKG_BACKEND"] = "Null" to use that installation, which should resolve this error."

@github-actions
Copy link
Contributor

This issue has been marked as stale because it has been open for 30 days with no activity. If the issue is still relevant then please leave a comment, or else it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues about to be auto-closed label Aug 29, 2023
@KronosTheLate
Copy link
Author

It would be helpfull to mention this possible fix in the precompilation error.

@github-actions github-actions bot removed the stale Issues about to be auto-closed label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants