# iparaview-kernel: trouble installing within a custom python venv

**URL:** https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033
**Category:** Web Support
**Created:** [July 10, 2024, 3:16pm UTC](https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033 "2024-07-10T15:16:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Trophime](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trophime/32/966_2.png) [@Trophime](https://discourse.paraview.org/u/Trophime)
#### Post date: [July 10, 2024, 3:16pm UTC](https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033/1 "2024-07-10T15:16:05Z")

</div>

Hi,  
I would like to install iparaview-kernel within a python virtual env.  
I have managed to build the kernel without problem  
But I can get the example notebook to work.  
I guess this is connected to my choice of installation.  
`cmake .. -DCMAKE_INSTALL_PREFIX=../../pyvista-env`

The files are installed in:

```auto
-- Install configuration: ""
-- Up-to-date: /mnt/d/python-envs/pyvista-env/IParaView/paraview_kernel.py
-- Up-to-date: /mnt/d/python-envs/pyvista-env/IParaView/kernel.json
-- Up-to-date: /mnt/d/python-envs/pyvista-env/IParaView/config.py
-- Up-to-date: /mnt/d/python-envs/pyvista-env/IParaView/PVQtJupyterPlugin/PVQtJupyterPlugin.so

```

I guess, the files are not installed correctly…  
Where shall I install them?  
Thanks for your suggestions  
Best  
C.

PS: I’m trying this on wsl debian bookworm with pyvista and jupyter in a virtual env.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 11, 2024, 9:32pm UTC](https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033/2 "2024-07-11T21:32:16Z")

</div>

Cc: @jourdain

---

<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: [August 6, 2024, 4:33pm UTC](https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033/3 "2024-08-06T16:33:37Z")

</div>

This is actually a work from KEU (@mwestphal)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 8, 2024, 8:02am UTC](https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033/4 "2024-08-08T08:02:55Z")

</div>

@tgalland

---

<div class="post-metadata">

### Author: ![sherin.sugathan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sherin.sugathan/32/15264_2.png) [@sherin.sugathan](https://discourse.paraview.org/u/sherin.sugathan)
#### Post date: [August 8, 2024, 11:49am UTC](https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033/5 "2024-08-08T11:49:47Z")

</div>

Hi!  
I used the kernel once to access paraview from a jupyter notebook. In your case, I think there is nothing wrong in your choice of installation location being a virtual environment. In addition to setting a custom location through cmake variable, you might also need to to setup the `ParaView_DIR` dependency for init and starting the kernel inside the notebook.

You may also consider posting here any specific error messages you see. That will help Kitware experts to comment on your case.

---

<div class="post-metadata">

### Author: ![tgalland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tgalland/32/11578_2.png) [@tgalland](https://discourse.paraview.org/u/tgalland)
#### Post date: [September 2, 2024, 2:57pm UTC](https://discourse.paraview.org/t/iparaview-kernel-trouble-installing-within-a-custom-python-venv/15033/6 "2024-09-02T14:57:15Z")

</div>

Hello @Trophime,

Sorry for the late reply.

Indeed it seems that the files are not installed at the good location. The `CMAKE_INSTALL_PREFIX` should contain a path where the Jupyter Notebook will be able to find the kernel. This path depends on your distribution (please see [Making kernels for Jupyter — jupyter\_client 8.6.2 documentation](https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs)). On linux for example, you may want to use `~/.local/share/jupyter/kernels`.

Since you are working from a virtual environment, you may need to edit the `kernel.json` file installed in this directory, and replace the python path (first argument) with the one of your virtual env (e.g. `/path_to_your_venv/bin/python3.12`). This is an actual limitation of the kernel installation process and we are working on it 🙂

Hoping this will solve your problem.
