# Exact reproducibility of mixed Julia/Python project

**URL:** <https://discourse.julialang.org/t/exact-reproducibility-of-mixed-julia-python-project/127491>\
**Category:** General Usage\
**Tags:** interoperability, python, reproducibility\
**Created:** [March 29, 2025, 5:07pm UTC](https://discourse.julialang.org/t/exact-reproducibility-of-mixed-julia-python-project/127491 "2025-03-29T17:07:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Post date:** [March 29, 2025, 5:07pm UTC](https://discourse.julialang.org/t/exact-reproducibility-of-mixed-julia-python-project/127491/1 "2025-03-29T17:07:41Z")

</div>

What’s a smooth workflow to achieve exact reproducibility in a mixed Julia/Python project (not library), with either Julia or Python as the host language? I’d like to specify, i.e. lock, the versions of all the following: (1) Julia (2) Julia packages (3) Python interpreter (4) Python packages.

---

<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:** [March 29, 2025, 8:45pm UTC](https://discourse.julialang.org/t/exact-reproducibility-of-mixed-julia-python-project/127491/2 "2025-03-29T20:45:34Z")

</div>

Author of PythonCall.jl/pyjuliacall here. There’s no locking mechanism directly supported yet.

However if you are using Julia with PythonCall.jl, you could explicitly save off the `pixi.lock` file that is written by CondaPkg.jl (assuming you’re using the default Pixi backend), and write a little script to:

1. Do `CondaPkg.resolve()` to resolve once (with probably the wrong versions of packages).
2. Copy the lock file into the right place.
3. Call `pixi install --locked` to install the correct versions of packages.

If you instead use Python with pyjuliacall, you could do a similar thing to save off and restore Julia’s `Manifest.toml` file.

It would be nice to have this built-in but it’s not there yet.

---

<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:** [March 29, 2025, 8:46pm UTC](https://discourse.julialang.org/t/exact-reproducibility-of-mixed-julia-python-project/127491/3 "2025-03-29T20:46:24Z")

</div>

Or if you want super-duper-reproducibility then you can always wrap everything up into a Docker image.
