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

[BUG] InitError: Python: ModuleNotFoundError: No module named 'matplotlib' #616

Closed
ryanhill1 opened this issue Nov 10, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@ryanhill1
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

using Bloqade $\rightarrow$ ERROR: InitError: Python: ModuleNotFoundError: No module named 'matplotlib'

To Reproduce
A code snippet to reproduce the behavior

julia> using Bloqade
ERROR: InitError: Python: ModuleNotFoundError: No module named 'matplotlib'
Python stacktrace: none
Stacktrace:
  [1] pythrow()
    @ PythonCall /opt/.julia/packages/PythonCall/wXfah/src/err.jl:94
  [2] errcheck
    @ /opt/.julia/packages/PythonCall/wXfah/src/err.jl:10 [inlined]
  [3] pyimport(m::String)
    @ PythonCall /opt/.julia/packages/PythonCall/wXfah/src/concrete/import.jl:11
  [4] __init__()
    @ Bloqade /opt/.julia/packages/Bloqade/vg0g0/src/Bloqade.jl:50
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1115
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1061
  [7] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1506
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1783
  [9] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
 [10] macro expansion
    @ ./loading.jl:1648 [inlined]
 [11] macro expansion
    @ ./lock.jl:267 [inlined]
 [12] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
during initialization of module Bloqade

Expected behavior
A clear and concise description of what you expected to happen.

using Bloqade command should go through

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot 2023-11-10 at 2 31 41 PM
Screenshot 2023-11-10 at 2 32 12 PM

Version Info

  • Julia version: 1.9.3
  • Python version: 3.9.18
  • Matplotlib version: 3.8.1
  • PythonCall version: 0.9.15
  • Bloqade version: 0.1.25 (#bc8e97e)

Additional context
Add any other context about the problem here.

Related issues: #593, #595, #605

@ryanhill1 ryanhill1 added the bug Something isn't working label Nov 10, 2023
@mrs504aa
Copy link

I've met similar problem. I solved it by adding matplotlib through CondaPkg.

julia> using CondaPkg
(@v1.9) pkg> conda add matplotlib

@ryanhill1
Copy link
Contributor Author

@mrs504aa This worked, thanks!

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

3 participants