# Julia Error: InitError when trying to use Plots in Python via JuliaCall

**URL:** <https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425>\
**Category:** New to Julia\
**Tags:** question, plots, juliacall\
**Created:** [April 2, 2024, 2:48pm UTC](https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425 "2024-04-02T14:48:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fumikobayashi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fumikobayashi/32/208206_2.png) [@fumikobayashi](https://discourse.julialang.org/u/fumikobayashi)\
**Post date:** [April 2, 2024, 2:48pm UTC](https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425/1 "2024-04-02T14:48:02Z")

</div>

Hello,

I am trying to use the Julia package `Plots.jl` in Python3.11 via the `JuliaCall` package on Ubuntu 22.04.4 LTS. (Actually, I try to use another package that is developing a local community but I’m suspecting Plots.jl causes this problem.)  
However, I am encountering an InitError when I try to use the Plots package. Here is the error message I am getting:

```julia
juliacall.JuliaError: InitError: could not load library "/home/user/.julia/artifacts/648a32a349aac06f19b6bfed47f0b822b4ef28c3/lib/libgio-2.0.so"
/home/user/.julia/artifacts/648a32a349aac06f19b6bfed47f0b822b4ef28c3/lib/libgobject-2.0.so.0: undefined symbol: g_dir_unref

```

This error occurs when I try to execute the following line in Python:

```julia
jl.seval("using Plots")

```

I am using the `JuliaCall` package to create a Julia environment in Python, and I am trying to use the `Plots` package within this environment. I have successfully added the `Plots` package to my Julia environment using the `Pkg` module in Julia.

I tried to reinstall `Julia` and re-run precompile after deleting ‘.julia’.  
Also, I tried to change the `ENV["LD_LIBRARY_PATH"]=""` on python scripts:

```julia
jl.seval("ENV[\"LD_LIBRARY_PATH\"]=\"\"")
jl.seval("print(ENV[\"LD_LIBRARY_PATH\"])")

jl.seval("using Plots")

```

But it did not change this variable to `""` so, it did resolve the problem.

I am not sure why this error is occurring, and I would appreciate any help or guidance on how to resolve this issue.

Thank you in advance for your help.

Information of versions

```julia
Ubuntu 22.04.4 LTS
Python 3.11.8 (on venv)
Julia version 1.10.2
JulliaCall 0.9.19
Juliapkg 0.1.11

```

Fumi

---

<div class="post-metadata">

**Author:** ![vargasje](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vargasje/32/29898_2.png) [@vargasje](https://discourse.julialang.org/u/vargasje)\
**Post date:** [April 19, 2024, 12:39am UTC](https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425/2 "2024-04-19T00:39:27Z")

</div>

I am experiencing the same issue.

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [April 19, 2024, 7:38am UTC](https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425/3 "2024-04-19T07:38:04Z")

</div>

Could one of you post some complete code to reproduce the issue? That is, show how to set up a new venv and then what to call in python that leads to the error.
