koenrh / delete-tweets

Delete tweets from your timeline.
ISC License
792 stars 107 forks source link

ImportError: cannot import name deletetweets #71

Closed carlosvega closed 4 years ago

carlosvega commented 4 years ago

whenever I try to execute delete-tweets it raises the following error:

Traceback (most recent call last):
  File "env/bin/delete-tweets", line 5, in <module>
    from deletetweets.__main__ import main
  File "/Users/carlos.vega/Documents/deletetweets/twitter-2019-12-08/env/lib/python2.7/site-packages/deletetweets/__main__.py", line 7, in <module>
    from deletetweets import deletetweets
ImportError: cannot import name deletetweets

Either from a virtualenv or system wide.

sschoenith commented 4 years ago

I was able to fix this by:

That being said, its probably not a proper fix... but it works.

koenrh commented 4 years ago

My apologies for the delay.

As Python 2 is reaching end of life in just two days, could you try using Python 3? If you already have Python3 installed: uninstall the package, and then force the package to be installed using Python 3 python3 -m pip delete-tweets.

Raiuc commented 4 years ago

python3 -m pip install delete-tweets

IHIutch commented 4 years ago

@sschoenith 's answer worked for me as well

koenrh commented 4 years ago

Python 2 is end of life. Updated the README to reflect that Python 3 should be used.