# Janus and Python venv

**URL:** <https://swi-prolog.discourse.group/t/janus-and-python-venv/6852>\
**Category:** Discussion\
**Created:** [September 16, 2023, 12:27am UTC](https://swi-prolog.discourse.group/t/janus-and-python-venv/6852 "2023-09-16T00:27:44Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![xabush](https://avatars.discourse-cdn.com/v4/letter/x/bc8723/32.png) [@xabush](https://swi-prolog.discourse.group/u/xabush)\
**Post date:** [February 20, 2025, 12:29pm UTC](https://swi-prolog.discourse.group/t/janus-and-python-venv/6852/9 "2025-02-20T12:29:57Z")

</div>

Sorry for not providing details.

Yeah, I was referring to the SWI-Prolog library and my setup is calling python code from prolog. I’m on Ubuntu 22.04.

The issue was `janus` library didn’t use the conda environment that was active and was using the python binary under `/usr/bin`. Anyways, I was able to resolve the issue using the suggestions in this [thread](https://swi-prolog.discourse.group/t/janus-and-conda/7775). Essentially, building SWI-Prolog from the [source](https://github.com/SWI-Prolog/swipl-devel) and setting `-DPython_ROOT_DIR` when running `cmake`.

As a side-effect, building SWI-Prolog from the source resulted in losing REPL functionalities such as going through previously run history via Up/Down keys and tab completion.

---

_[View the full topic](https://swi-prolog.discourse.group/t/janus-and-python-venv/6852)._
