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

diffeqpy.de import fails with Julia 1.11.0 #144

Open
mcarobene-id opened this issue Oct 9, 2024 · 1 comment
Open

diffeqpy.de import fails with Julia 1.11.0 #144

mcarobene-id opened this issue Oct 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mcarobene-id
Copy link

Thank you so much for the development of diffeqpy! I have just started using it but finding it super helpful.

Describe the bug 🐞

Julia v1.11.0 was released on 08/10/24 (announced here)

We have a docker build which would install the most recent version of Julia, then runs in python from diffeqpy import de to install relevant Julia packages. This started failing since the new Julia release, but I have validated that this still works if I specifically install Julia v1.10.5

Expected behavior

Expect to be able to import and use diffeqpy.de. This is

Minimal Reproducible Example 👇

Note: requires that there is no existing install of Julia on machine.

From terminal:

pip install diffeqpy==2.4.1
jill install "1.11.0" --confirm
python -c "from diffeqpy import de"

Error & Stacktrace ⚠️

#14 408.8 Traceback (most recent call last):
#14 408.8 File "/app/build/install_julia.py", line 9, in <module>
#14 408.8 from diffeqpy import de
#14 408.8 File "/app/.venv/lib/python3.10/site-packages/diffeqpy/de.py", line 5, in <module>
#14 408.8 de.jit = Main.seval("jit(x) = typeof(x).name.wrapper(ModelingToolkit.complete(ModelingToolkit.modelingtoolkitize(x)), x.u0, x.tspan, x.p)") # kinda hackey
#14 408.8 File "/home/ray/.julia/packages/PythonCall/Nr75f/src/JlWrap/any.jl", line 254, in __setattr__
#14 408.8 self._jl_callmethod($(pyjl_methodnum(pyjlany_setattr)), k, v)
#14 408.8 AttributeError: Julia: Global DifferentialEquations.jit does not exist and cannot be assigned. Declare it using `global` before attempting assignment.

Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
Status `~/.julia/environments/v1.11/Project.toml` (empty project)
  • Output of using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
Status `~/.julia/environments/v1.11/Manifest.toml` (empty manifest)
  • Output of versioninfo()
Julia Version 1.11.0
Commit 501a4f25c2b (2024-10-07 11:40 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M3
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
@mcarobene-id mcarobene-id added the bug Something isn't working label Oct 9, 2024
@ChrisRackauckas
Copy link
Member

This seems like it's due to an issue with PyCall.jl on Julia v1.11. For now the current release will just stick to v1.10 until that gets sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants