'Python Tweepy app will not run on new machine but runs on my laptop

Just like it says. The app runs like a charm on my MacBook but on my M1 MacMini, both machines run Python3.7.2, server I get this error.

Traceback (most recent call last): File "/Users/rosie/Projects/Twitter/RosieBotMaster/RosieBotMaster/RosieBotMaster/RosieBotv2.py", line 4, in import tweepy ModuleNotFoundError: No module named 'tweepy'

I've executed pip3 install Tweepy and it says it's already loaded. I am pretty confused as to what to do next.

The code is as follows

#!/usr/bin/python3
# coding=utf8

import tweepy
from time import sleep
import logging
import smtplib
from datetime import datetime
from credentials import *

logging.basicConfig(format='%(asctime)s %(message)s')
logging.warning('Task Started')

api =tweepy.API(auth,wait_on_rate_limit=True,wait_on_rate_limit_notify=True)

## auto retweet

for tweet in tweepy.Cursor(api.search, 
                            tweet_mode='extended', 
                            include_rts=False, 
                            lang='en', 
                            q='#Denver').items(1):
        try:
            print('\nTweet by: @' + tweet.user.screen_name)

            tweet.retweet()
            print('Retweeted the tweet')

        # Favorite the tweet
            tweet.favorite()
            print('Favorited the tweet')

        # Follow the user who tweeted
            tweet.user.follow()
            print('Followed the user')

            sleep(10)

        except tweepy.TweepError as e:
            print(e.reason)

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source