PyCall jumping from python to julia to python error

Hello,

I have a backend algorithm which makes julia calls, I do this via the PyCall package.
however, one of the packages in julia recently updated, and it itself makes use of PyCall.
no mater what I try to do, I always get an error.
If i set pycall in julia via Pkg.build(“PyCall”), I can call the package, however python cannot call julia.
if I set pycall in python3 via julia.install(), then the package can’t run properly in julia.

to reproduce this here is a quick example:

test.jl

using Pkg
Pkg.add("PyCall")
ENV["PYTHON"]=""
Pkg.add(PackageSpec(url="https://bitbucket.org/SSamanipour/safd.jl/src/master/"))
Pkg.build("SAFD")
Pkg.test("SAFD")

test.py

from julia import Main as jl
jl.include("test.jl")

if I run python3 test.py

I get into an error as that specific python is not configured py the shared pycall.

what I would like is that the pycall in python not be the same for python. it seems that if you configure pycall in one it will force the other.

I tried using juliacall, however if I use pycall with it, it seems to also break.

if I try to have ENV["PYTHON"]="python3", I can’t run the SAFD package.

Any help would be greatly appreciated, as I’ve been a few days on this and tried multiple solutions and everything seems to give me a different error.

some info:
doing this on an aws amazon2 linux OS and an aws r5.large instance.

I’m using python 3.10.0

versioninfo()
Julia Version 1.6.3
Commit ae8452a9e0 (2021-09-23 17:34 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake-avx512)