# Error on telegram import Update

**URL:** <https://discuss.python.org/t/error-on-telegram-import-update/90382>\
**Category:** Python Help\
**Tags:** help\
**Created:** [May 1, 2025, 6:53pm UTC](https://discuss.python.org/t/error-on-telegram-import-update/90382 "2025-05-01T18:53:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miquelt9](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/miquelt9/32/27609_2.png) [@miquelt9](https://discuss.python.org/u/miquelt9)\
**Post date:** [May 1, 2025, 6:53pm UTC](https://discuss.python.org/t/error-on-telegram-import-update/90382/1 "2025-05-01T18:53:38Z")

</div>

Hi!

I am using python to run a Telegram bot on Ubuntu 22.04.5 LTS, I am however facing an importing error:

```python
raceback (most recent call last):
  File "/home/shared_dir/otaniemi_bot/bot.py", line 2, in <module>
    from telegram import Update
ImportError: cannot import name 'Update' from 'telegram' (/home/miquel/.local/lib/python3.10/site-packages/telegram/ __init__.py)

```

Which I am not understanding why it is happening since I have the modules installed with pip.

```python
$ python3 -m pip show telegram
Name: telegram
Version: 0.0.1
Summary: Telegram APIs
Home-page: https://github.com/liluo/telegram
Author: liluo
Author-email: i@liluo.org
License: MIT
Location: /home/miquel/.local/lib/python3.10/site-packages
Requires:
Required-by:

```

```python
$ python3 -m pip show python-telegram-bot
Name: python-telegram-bot
Version: 21.10
Summary: We have made you a wrapper you can't refuse
Home-page:
Author:
Author-email: Leandro Toledo <devs@python-telegram-bot.org>
License:
Location: /home/miquel/.local/lib/python3.10/site-packages
Requires: httpx
Required-by:

```

---

<div class="post-metadata">

**Author:** ![onePythonUser](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/onepythonuser/32/19158_2.png) [@onePythonUser](https://discuss.python.org/u/onePythonUser)\
**Post date:** [May 1, 2025, 8:12pm UTC](https://discuss.python.org/t/error-on-telegram-import-update/90382/2 "2025-05-01T20:12:06Z")

</div>

Hello,

a google search brought me here:

> **[Building Telegram Bot with Python-Telegram-Bot: A Comprehensive Guide](https://medium.com/@moraneus/building-telegram-bot-with-python-telegram-bot-a-comprehensive-guide-7e33f014dc79)**
>
> Demonstrating of a very simple Car Sales Listing Bot that is designed to streamline the process of gathering some info.

To import the module, you might have to try:

```python
python3 -m pip install python-telegram-bot

```

Does this work for you?

---

<div class="post-metadata">

**Author:** ![miquelt9](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/miquelt9/32/27609_2.png) [@miquelt9](https://discuss.python.org/u/miquelt9)\
**Post date:** [May 1, 2025, 8:29pm UTC](https://discuss.python.org/t/error-on-telegram-import-update/90382/3 "2025-05-01T20:29:36Z")

</div>

Thanks for your reply, I got this output

```python
$ python3 -m pip install python-telegram-bot
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: python-telegram-bot in /home/miquel/.local/lib/python3.10/site-packages (21.10)
Requirement already satisfied: httpx~=0.27 in /home/miquel/.local/lib/python3.10/site-packages (from python-telegram-bot) (0.28.1)
Requirement already satisfied: anyio in /home/miquel/.local/lib/python3.10/site-packages (from httpx~=0.27->python-telegram-bot) (4.8.0)
Requirement already satisfied: idna in /usr/lib/python3/dist-packages (from httpx~=0.27->python-telegram-bot) (3.3)
Requirement already satisfied: httpcore==1.* in /home/miquel/.local/lib/python3.10/site-packages (from httpx~=0.27->python-telegram-bot) (1.0.7)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from httpx~=0.27->python-telegram-bot) (2020.6.20)
Requirement already satisfied: h11<0.15,>=0.13 in /home/miquel/.local/lib/python3.10/site-packages (from httpcore==1.*->httpx~=0.27->python-telegram-bot) (0.14.0)
Requirement already satisfied: typing_extensions>=4.5 in /home/miquel/.local/lib/python3.10/site-packages (from anyio->httpx~=0.27->python-telegram-bot) (4.12.2)
Requirement already satisfied: exceptiongroup>=1.0.2 in /home/miquel/.local/lib/python3.10/site-packages (from anyio->httpx~=0.27->python-telegram-bot) (1.2.2)
Requirement already satisfied: sniffio>=1.1 in /home/miquel/.local/lib/python3.10/site-packages (from anyio->httpx~=0.27->python-telegram-bot) (1.3.1)

```

And same for telegram package:

```python
$ python3 -m pip install telegram
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: telegram in /home/miquel/.local/lib/python3.10/site-packages (0.0.1)

```

But still does not work, continuing with same error `ImportError: cannot import name 'Update' from 'telegram'`

---

<div class="post-metadata">

**Author:** ![onePythonUser](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/onepythonuser/32/19158_2.png) [@onePythonUser](https://discuss.python.org/u/onePythonUser)\
**Post date:** [May 1, 2025, 8:47pm UTC](https://discuss.python.org/t/error-on-telegram-import-update/90382/4 "2025-05-01T20:47:00Z")

</div>

> [@miquelt9](#):
>
> ImportError: cannot import name ‘Update’ from ‘telegram’

From this:

> <https://stackoverflow.com/questions/75995740/importerror-cannot-import-name-update-from-telegram>

Can you try:

```python
pip install python-telegram-bot

```
