Recent

Author Topic: Python4Lazarus - importing library from virtual environment  (Read 188 times)

kapibara

  • Hero Member
  • *****
  • Posts: 649
Python4Lazarus - importing library from virtual environment
« on: February 20, 2025, 06:54:26 am »
There is a python library that wants to be installed only in a virtual environment. AI says it is possible to access such libraries from Python4Laz by something like this:
Code: Pascal  [Select][+][-]
  1.     PythonEngine1.PythonHome := '/home/user/.venv/';
  2.     PythonEngine1.PythonPath := '/home/user/.venv/lib/python3.12/site-packages/';
  3.  
But that doesn't work. Anyone knows how to do it? Maybe this has to be initialized at a certain stage?
Lazarus trunk / fpc 3.2.2 / Kubuntu 24.04 - 64 bit

 

TinyPortal © 2005-2018