# Error message report

**URL:** https://discourse.julialang.org/t/error-message-report/112047
**Category:** New to Julia
**Tags:** question
**Created:** [March 24, 2024, 6:43pm UTC](https://discourse.julialang.org/t/error-message-report/112047 "2024-03-24T18:43:27Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Andromeda258](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)
#### Post date: [March 24, 2024, 6:43pm UTC](https://discourse.julialang.org/t/error-message-report/112047/1 "2024-03-24T18:43:27Z")

</div>

I am encountering a program crash with the following error message:

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.  
Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x7ffd31cebf5e – DllCanUnloadNow at C:\Users\zhouz\anaconda3\envs\causaldis\DLLs\_ctypes.pyd (unknown line)  
in expression starting at none:0  
DllCanUnloadNow at C:\Users\zhouz\anaconda3\envs\causaldis\DLLs\_ctypes.pyd (unknown line)  
unknown function (ip: 00007ffd31ce6f11)  
PyObject\_MakeTpCall at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyObject\_Vectorcall at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyEval\_EvalFrameDefault at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyEval\_EvalCode at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyRun\_FileExFlags at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyRun\_FileExFlags at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyRun\_StringFlags at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyRun\_SimpleFileObject at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
PyRun\_AnyFileObject at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
Py\_gitidentifier at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
Py\_gitidentifier at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
Py\_RunMain at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
Py\_Main at C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll (unknown line)  
OPENSSL\_Applink at C:\Users\zhouz\anaconda3\envs\causaldis\python.exe (unknown line)  
BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)  
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)  
Allocations: 408549740 (Pool: 408545602; Big: 4138); GC: 584

Process finished with exit code 1

Is there any idea how to fix this problem?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [March 24, 2024, 7:31pm UTC](https://discourse.julialang.org/t/error-message-report/112047/2 "2024-03-24T19:31:07Z")

</div>

Welcome to the community!

What is the output of

```julia
versioninfo()

```

What is the output of:

```julia
using Pkg
Pkg.status()

```

?

---

<div class="post-metadata">

### Author: ![Andromeda258](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)
#### Post date: [March 25, 2024, 2:25am UTC](https://discourse.julialang.org/t/error-message-report/112047/3 "2024-03-25T02:25:37Z")

</div>

Hi!  
The output of `versioninfo()` is:

```julia
julia> versioninfo()
Julia Version 1.10.1
Commit 7790d6f064 (2024-02-13 20:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, rocketlake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)

```

The output of `Pkg.status()` is:

```julia
julia> Pkg.status()
Status `C:\Users\zhouz\.julia\environments\v1.10\Project.toml`
  [8f5d6c58] EzXML v1.2.0      
  [aa1b3936] GraphIO v0.7.0    
  [a2cc645c] GraphPlot v0.5.2  
  [86223c79] Graphs v1.9.0     
  [093fc24a] LightGraphs v1.3.5
  [70f5e60a] LinkedLists v0.1.1
  [91a5bcdd] Plots v1.40.1     
  [438e738f] PyCall v1.96.4    
  [72c71f33] XML v0.3.2   

```

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [March 25, 2024, 7:11am UTC](https://discourse.julialang.org/t/error-message-report/112047/4 "2024-03-25T07:11:53Z")

</div>

Apart from some precompilation warnings I could add these packages to a new project on Linux, so the packages are nor broken.

You are using PyCall, which might use your local Python installation (outside of Julia), which could cause issues.

To do a fresh Python installation specific for Julia, please try:

```julia
ENV["PYTHON"]=""
Pkg.build("PyCall")

```

restart Julia, and try:

```julia
using PyPlot

```

Does that work?

---

<div class="post-metadata">

### Author: ![Andromeda258](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)
#### Post date: [March 25, 2024, 2:15pm UTC](https://discourse.julialang.org/t/error-message-report/112047/5 "2024-03-25T14:15:04Z")

</div>

I am calling Julia functions from Python using Pyjulia. After doing the code you mentioned, I could not launch Julia from Python with this error:

```julia
Traceback (most recent call last):
  File "C:\Users\zhouz\Purdue\CausalML\proj\Sample Efficient\RootPicking.py", line 8, in <module>
    from julia import Main
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "C:\Users\zhouz\anaconda3\envs\causaldis\Lib\site-packages\julia\core.py", line 253, in create_module
    JuliaMainModule(self, fullname))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zhouz\anaconda3\envs\causaldis\Lib\site-packages\julia\core.py", line 151, in __init__
    self._julia = loader.julia
                  ^^^^^^^^^^^^
  File "C:\Users\zhouz\anaconda3\envs\causaldis\Lib\site-packages\julia\core.py", line 242, in julia
    self. __class__.julia = julia = Julia()
                                   ^^^^^^^
  File "C:\Users\zhouz\anaconda3\envs\causaldis\Lib\site-packages\julia\core.py", line 495, in __init__
    raise UnsupportedPythonError(jlinfo)
julia.core.UnsupportedPythonError: It seems your Julia and PyJulia setup are not supported.

Julia executable:
    julia
Python interpreter and libpython used by PyCall.jl:
    C:\Users\zhouz\.julia\conda\3\x86_64\python.exe
    C:\Users\zhouz\.julia\conda\3\x86_64\python310.dll
Python interpreter used to import PyJulia and its libpython.
    C:\Users\zhouz\anaconda3\envs\causaldis\python.exe
    C:\Users\zhouz\anaconda3\envs\causaldis\python312.dll

In Julia >= 0.7, above two paths to `libpython` have to match exactly
in order for PyJulia to work out-of-the-box. To configure PyCall.jl to use
Python interpreter "C:\Users\zhouz\anaconda3\envs\causaldis\python.exe",
run the following code in the Python REPL:

    >>> import julia
    >>> julia.install()

For more information, see:

    https://pyjulia.readthedocs.io/en/latest/troubleshooting.html

Process finished with exit code 1

```

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [March 25, 2024, 2:39pm UTC](https://discourse.julialang.org/t/error-message-report/112047/6 "2024-03-25T14:39:03Z")

</div>

It is not really clear to me what you actually want to do.

- do you want to use Python from Julia, e.g. by using PyPlot?
- do you want to use Julia from Python?
- do you want to use both?

Doing one of these things should be easy, doing both is not easy… You then need either two different Python environments, or you need to use only packages for both scenarios that are compatible…

Can you explain in more detail what you actually want to do, and which Python packages and which Python environment(s) you want to use?

---

<div class="post-metadata">

### Author: ![Andromeda258](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)
#### Post date: [March 25, 2024, 2:46pm UTC](https://discourse.julialang.org/t/error-message-report/112047/7 "2024-03-25T14:46:36Z")

</div>

I just want to call Julia functions from Python by using Pyjulia. The Julia repo I am using is: [CliquePicking/aaai\_experiments at master · mwien/CliquePicking · GitHub](https://github.com/mwien/CliquePicking/tree/master/aaai_experiments). I am using conda for Python, the result of `conda list` is:

```julia
(causaldis) C:\Users\zhouz>conda list
# packages in environment at C:\Users\zhouz\anaconda3\envs\causaldis:
#
# Name Version Build Channel
bzip2 1.0.8 he774522_0
ca-certificates 2023.12.12 haa95532_0
colorama 0.4.6 pypi_0 pypi
contourpy 1.2.0 pypi_0 pypi
cycler 0.12.1 pypi_0 pypi
einops 0.7.0 pypi_0 pypi
expat 2.5.0 hd77b12b_0
filelock 3.13.1 pypi_0 pypi
fonttools 4.48.1 pypi_0 pypi
fsspec 2024.2.0 pypi_0 pypi
graphical-models 0.1a19 pypi_0 pypi
jinja2 3.1.3 pypi_0 pypi
joblib 1.3.2 pypi_0 pypi
julia 0.6.2 pypi_0 pypi
kiwisolver 1.4.5 pypi_0 pypi
libffi 3.4.4 hd77b12b_0
markupsafe 2.1.5 pypi_0 pypi
matplotlib 3.8.2 pypi_0 pypi
mpmath 1.3.0 pypi_0 pypi
networkx 3.2.1 pypi_0 pypi
numpy 1.26.4 pypi_0 pypi
openssl 3.0.13 h2bbff1b_0
opt-einsum 3.3.0 pypi_0 pypi
packaging 23.2 pypi_0 pypi
pandas 2.2.0 pypi_0 pypi
patsy 0.5.6 pypi_0 pypi
pgmpy 0.1.24 pypi_0 pypi
pillow 10.2.0 pypi_0 pypi
pip 23.3.1 py312haa95532_0
pyagrum 1.12.1 pypi_0 pypi
pydot 2.0.0 pypi_0 pypi
pyparsing 3.1.1 pypi_0 pypi
python 3.12.1 h1d929f7_0
python-dateutil 2.8.2 pypi_0 pypi
pytz 2024.1 pypi_0 pypi
scikit-learn 1.4.0 pypi_0 pypi
scipy 1.12.0 pypi_0 pypi
setuptools 68.2.2 py312haa95532_0
six 1.16.0 pypi_0 pypi
sqlite 3.41.2 h2bbff1b_0
statsmodels 0.14.1 pypi_0 pypi
sympy 1.12 pypi_0 pypi
threadpoolctl 3.2.0 pypi_0 pypi
tk 8.6.12 h2bbff1b_0
torch 2.2.0 pypi_0 pypi
tqdm 4.66.2 pypi_0 pypi
typing-extensions 4.9.0 pypi_0 pypi
tzdata 2024.1 pypi_0 pypi
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
wheel 0.41.2 py312haa95532_0
xgboost 2.0.3 pypi_0 pypi
xz 5.4.5 h8cc25b3_0
zlib 1.2.13 h8cc25b3_0

```

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [March 25, 2024, 3:50pm UTC](https://discourse.julialang.org/t/error-message-report/112047/8 "2024-03-25T15:50:04Z")

</div>

Please read: [Is PyJulia org, e.g. juliacall (or pyjulia) Python packages maintained?](https://discourse.julialang.org/t/is-pyjulia-org-e-g-juliacall-or-pyjulia-python-packages-maintained/109277)

In theory you can use either `PyJulia`, or `juliacall` for this purpose. PyJulia is the old way of doing it (and might break easily), and `juliacall` the new way of doing it, but I never used any of these two packages, so I cannot give any advice on this topic.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [March 25, 2024, 3:51pm UTC](https://discourse.julialang.org/t/error-message-report/112047/9 "2024-03-25T15:51:53Z")

</div>

You can undo this:

```julia
ENV["PYTHON"]=""
Pkg.build("PyCall")

```

by restarting Julia and running:

```julia
Pkg.build("PyCall")

```

But if that helps you to fix your current problem, I don’t know. I never used Julia from Python, only the other way round…

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [March 25, 2024, 4:04pm UTC](https://discourse.julialang.org/t/error-message-report/112047/10 "2024-03-25T16:04:25Z")

</div>

From the conda environment you sent me it seems you have a mix of packages from pypi and conda.

You might try building the environment completely from conda-forge components. Specify `-c conda-forge` when creating a new environment.

I recommend going with `juliacall` rather than `pyjulia`.

---

<div class="post-metadata">

### Author: ![Andromeda258](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)
#### Post date: [March 27, 2024, 3:04pm UTC](https://discourse.julialang.org/t/error-message-report/112047/11 "2024-03-27T15:04:24Z")

</div>

I will try to use `juliacall` instead, thank you for your help.

---

<div class="post-metadata">

### Author: ![Andromeda258](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)
#### Post date: [April 3, 2024, 2:52pm UTC](https://discourse.julialang.org/t/error-message-report/112047/12 "2024-04-03T14:52:54Z")

</div>

I am using `juliacall` instead now. Seems like this fixes the problem.
