@mwestphal
I created the virtual environment successfully with pvpython:
./pvpython -m venv .venv
But when I open the site packages directory (.venv/lib/python3.10/site-packages/), I do not see the actual Python packages that come pre-installed with ParaView:
pvpython -c '
from pathlib import Path
import site
site_packages = site.getsitepackages()[0]
for package in Path(site_packages).iterdir():
print(package.stem)
'
On the other hand, the Python executable in the virtual environment (.venv/bin/python) can correctly import the external packages, such as NumPy.
How can I get the actual site-packages directory of ParaView from within .venv?
This is to tell ParaView/pvpython/pvbatch to use the given virtual environment. What I would like to achieve is that the Python interpreter of the virtual environment created by
./pvpython -m venv .venv
knows about the installed packages. Because it doesn’t. When I launch that interpreter (.venv/bin/python) and execute
from pathlib import Path
import site
site_packages = site.getsitepackages()[0]
for package in Path(site_packages).iterdir():
print(package.stem)