this is a solution:
client=tweepy.Client(consumer_key='x',consumer_secret='x',access_token='x',access_token_secret='x')
client.create_tweet(text="hello")