dracarys18 / TweetBot

A simple Telegram Bot to Stream the tweets from any twitter accounts to Telegram Channel
MIT License
103 stars 45 forks source link

No module named 'telegram' #12

Closed JustAKat closed 2 years ago

JustAKat commented 2 years ago

After performing all the steps up to the requirements installing, when attempting to execute the bot, this error occurs:

root:~/TweetBot# python3.6 TweetBot/main.py
Traceback (most recent call last):
  File "TweetBot/main.py", line 1, in <module>
    import telegram
ModuleNotFoundError: No module named 'telegram'

This is the produced log whilst installing the requirements: https://www.toptal.com/developers/hastebin/ikaqisetok.apache

Wish to seek your advice in resolving the issue

JustAKat commented 2 years ago

Update:

In case if needed, here are the slightly modified steps used, whilst trying to resolve that issue:

cd TweetBot
python3 -m venv telegramtwitterenv

. telegramtwitterenv/bin/activate

pip install -r requirements.txt
pip install telegram

python3.6 main.py
dracarys18 commented 2 years ago

Looks like your pip is using an older version of python you have check it by running "ls -l `which pip` " to confirm. You can just run python3.6 -m pip install -r requirements.txt and run main.py again.

JustAKat commented 2 years ago

That resolved that error, thanks!