-
Notifications
You must be signed in to change notification settings - Fork 3
How to work with Python packages via e.g. venvs, uv, or conda? #39
Description
A large part of the attractiveness of calling Python (for me, the only reason really!) are the packages available on PyPI. Particularly the uv package manager makes it very quick to access all kinds of libraries with functionality that to this day has alas no native Haskell implementation.
The obvious question is: can we access such packages from Haskell using inline-python? I suppose this should be done in some Python virtual environment. The naïve ways don't seem to work, as in, neither running the Haskell processes inside uv run nor after activating a Conda environment do I actually get to use the associated Python interpreters or installed packages. Instead,
runPy [pymain| import sys; print(sys.version) |]
always only shows me the default Python version installed in the operating system.
Is there a way, or is this a fundamental limitation of the way inline-python uses Python as a library?