Python Forum

Full Version: Problem with importing python-telegram library into the project
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.