# Libpcre2-8-0.dll not found with pyjulia / proper way to use julia functions in Python

**URL:** <https://discourse.julialang.org/t/libpcre2-8-0-dll-not-found-with-pyjulia-proper-way-to-use-julia-functions-in-python/128752>\
**Category:** New to Julia\
**Created:** [May 6, 2025, 12:28pm UTC](https://discourse.julialang.org/t/libpcre2-8-0-dll-not-found-with-pyjulia-proper-way-to-use-julia-functions-in-python/128752 "2025-05-06T12:28:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Owen77S](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/owen77s/32/212276_2.png) [@Owen77S](https://discourse.julialang.org/u/Owen77S)\
**Post date:** [May 6, 2025, 12:28pm UTC](https://discourse.julialang.org/t/libpcre2-8-0-dll-not-found-with-pyjulia-proper-way-to-use-julia-functions-in-python/128752/1 "2025-05-06T12:28:32Z")

</div>

I have a Julia environnement called env and structured this way :

env/  
│  
├── Project.toml  
├── Manifest.toml  
├── folder/  
│ └── funcs.jl  
│ └── script.py  
│ └── script.jl

My file funcs.jl is using packages installed in env, and I’m using pyjulia to retrieve functions from this file to be used in my python script.

In Python, I’m using :

```julia
import julia
j = julia.Julia()
j.eval('using Pkg')
j.eval('Pkg.activate("env")')
j.eval('include("folder/funcs.jl")

```

But I’m getting this error :

```julia
ImportError: <PyCall.jlwrap (in a Julia function called from Python)
JULIA: LoadError: InitError: could not load library "libpcre2-8-0.dll"
The specified module could not be found.

```

But I’m able to include the file in a Julia file…

1. How to resolve it ?

The functions in funcs.jl are also used in script.jl.

1. Is there a proper way to make funcs.jl be used by both my Python and Julia script ? I’ve found another solution : make a package, and use it both in the two scripts, but I wasn’t able to make it work…

---

<div class="post-metadata">

**Author:** ![Janis\_Erdmanis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/janis_erdmanis/32/10869_2.png) [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Post date:** [May 6, 2025, 1:59pm UTC](https://discourse.julialang.org/t/libpcre2-8-0-dll-not-found-with-pyjulia-proper-way-to-use-julia-functions-in-python/128752/2 "2025-05-06T13:59:02Z")

</div>

This may be an issue with recent Python versions as pointed out in this GitHub issue: [Julia is unable to launch in the Universal Windows Platform (UWP) · Issue #52007 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/52007#issuecomment-2843876831)

The root cause likely involves Julia using the older MSVCRT runtime instead of the newer Universal C Runtime (UCRT). There may have benn a compatability layer in older python versions that could have been deprecated recently.

I really wish someone would do the UCRT port for Julia as it also interferes with running applications in MSIX sandbox environment.
