You need to add the path to libgit2.dll to the PATH environment variable.
I think for you it is
"C:/Users/johan/.conda/envs/iqc_test/julia_env/pyjuliapkg/install/bin"
I am not sure what’s your setting, so I use the windows \ standard for this path and I assume that you are using powershell (because I see a PS prompt).
Add the following to your PATH environment variable, e.g.:
PS X:\> $env:Path += ';C:\Users\johan\.conda\envs\iqc_test\julia_env\pyjuliapkg\install\bin'
PS X:\> python.exe
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from juliacall import Main as jl
>>> jl.seval("ccall((:git_libgit2_init, :libgit2), Cint, ())")
1
Of course I did another PATH for me, so it worked for me. But above should do for you.
I would say this is something worth to open up an issue (if it doesn’t exists already, didn’t check, GitHub - cjdoris/PythonCall.jl: Python and Julia in harmony.).