Python Forum
Problem with importing python-telegram library into the project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with importing python-telegram library into the project
#1
Hello. I'm having trouble importing the python-telegram library into my project. I installed it with the command pip install python-telegram, and the installation was successful, but when I try to use this lib by writing in pycharm "from telegram.client import Telegram" (as stated in the documentation), pycharm says that there is no Telegram class in telegram.client. What can help? Python version 3.10.7, Windows operating system.
Reply
#2
You should not be using pip to import libraries when using pycharm. Pycharm has a different way to install.

https://www.jetbrains.com/help/pycharm/i...kages.html

https://www.jetbrains.com/pycharm/guide/...t%20styles.

You can open a terminal and do a pip install, but you REALLY need to make sure that you activate the SAME virtual environment that is used by PyCharm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I am sending messages using Python to Telegram, but I need to use WhatsApp for it Hendrikb 0 338 Apr-29-2025, 09:38 AM
Last Post: Hendrikb
  Python-based telegram spam bot-telegram-bot archer24 1 790 Feb-07-2025, 04:16 PM
Last Post: archer24
  Help needed in finding a library for this project PythonEnthusiast1729 7 2,775 Dec-27-2023, 11:27 AM
Last Post: PythonEnthusiast1729
  dynamic variable name declaration in OOP style project problem jacksfrustration 3 2,423 Oct-22-2023, 10:05 PM
Last Post: deanhystad
Music Help with: Audiobook Library/Copier Project eleven43 0 1,091 Sep-14-2023, 04:17 PM
Last Post: eleven43
  cinemagoer library problem lunacy90 21 7,277 Sep-08-2023, 04:30 PM
Last Post: menator01
  queue for async function python telegram.ext noctious 0 4,173 Jun-11-2023, 02:58 PM
Last Post: noctious
  python standard way of importing library mg24 1 1,621 Nov-15-2022, 01:41 AM
Last Post: deanhystad
  Telegram bot python help! wolfdevs 0 1,284 Sep-07-2022, 11:34 AM
Last Post: wolfdevs
  Problem with importing Python file in Visual Studio Code DXav 7 10,551 Jun-15-2022, 12:54 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020