Skip to content

How to work with Python packages via e.g. venvs, uv, or conda? #39

Description

@leftaroundabout

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions