# Install any python package question

**URL:** https://discourse.paraview.org/t/install-any-python-package-question/17608
**Category:** Development
**Created:** [May 27, 2026, 11:36am UTC](https://discourse.paraview.org/t/install-any-python-package-question/17608 "2026-05-27T11:36:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![CsatiZoltan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/csatizoltan/32/6997_2.png) [@CsatiZoltan](https://discourse.paraview.org/u/CsatiZoltan)
#### Post date: [May 27, 2026, 11:36am UTC](https://discourse.paraview.org/t/install-any-python-package-question/17608/1 "2026-05-27T11:36:40Z")

</div>

@mwestphal  
I created the virtual environment successfully with pvpython:

```bash
./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:

```bash
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?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [May 27, 2026, 3:08pm UTC](https://discourse.paraview.org/t/install-any-python-package-question/17608/2 "2026-05-27T15:08:41Z")

</div>

```auto
pvpython --venv .venv 
pvbatch --venv .venv
paraview --venv .venv

```

---

<div class="post-metadata">

### Author: ![CsatiZoltan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/csatizoltan/32/6997_2.png) [@CsatiZoltan](https://discourse.paraview.org/u/CsatiZoltan)
#### Post date: [May 27, 2026, 3:34pm UTC](https://discourse.paraview.org/t/install-any-python-package-question/17608/3 "2026-05-27T15:34:15Z")

</div>

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

```auto
./pvpython -m venv .venv

```

knows about the installed packages. Because it doesn’t. When I launch that interpreter (_.venv/bin/python_) and execute

```python
from pathlib import Path
import site
site_packages = site.getsitepackages()[0]
for package in Path(site_packages).iterdir():
    print(package.stem)

```

it prints

```auto
pip
pkg_resources
distutils-precedence
setuptools
_distutils_hack
setuptools-65.5.0
pip-23.0.1

```

which is far from all the packages that ParaView ships.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [May 27, 2026, 9:05pm UTC](https://discourse.paraview.org/t/install-any-python-package-question/17608/4 "2026-05-27T21:05:17Z")

</div>

To use a venv with ParaView in it, you just need to set the PYTHONPATH and LD\_LIBRARY\_PATH (linux) environment variable.

What was discussed before was to use the venv to pip install things and have those things available inside ParaView Qt or ParaView Python shell.
