# Installing numpy on Jupyterlab hosted on Yunohost

**URL:** https://eijil.com/t/installing-numpy-on-jupyterlab-hosted-on-yunohost/440
**Category:** 其它
**Created:** [May 17, 2023, 2:05pm UTC](https://eijil.com/t/installing-numpy-on-jupyterlab-hosted-on-yunohost/440 "2023-05-17T14:05:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Tristan](https://eijil.com/user_avatar/eijil.com/tristan/32/986_2.png) [@Tristan](https://eijil.com/u/Tristan)
#### Post date: [May 17, 2023, 2:05pm UTC](https://eijil.com/t/installing-numpy-on-jupyterlab-hosted-on-yunohost/440/1 "2023-05-17T14:05:34Z")

</div>

I’m self-hosting a Jupyterlab instance with Yunohost, but one annoying thing is that packages like numpy are not installed by default.

```python
import numpy as np

```

```auto
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import numpy as np

ModuleNotFoundError: No module named 'numpy'

```

Here is a way to install python packages

```python
!/opt/jupyterlab/venv/bin/python -m pip install numpy

```

try to import again, no error message showed up:

```python
import numpy as np
np.pi

```

```python
3.141592653589793

```

---

<div class="post-metadata">

### Author: ![Tristan](https://eijil.com/user_avatar/eijil.com/tristan/32/986_2.png) [@Tristan](https://eijil.com/u/Tristan)
#### Post date: [October 16, 2023, 1:07am UTC](https://eijil.com/t/installing-numpy-on-jupyterlab-hosted-on-yunohost/440/2 "2023-10-16T01:07:49Z")

</div>

Python cheat sheet  
[Ultimate Python Cheatsheet 🔥.pdf](https://eijil.com/uploads/short-url/ymUogbCP13Co0aTy0uJ00IPnGs5.pdf) (2.3 MB)
