When I try to import the twint
package (https://pypi.org/project/twint/) to Jupyter Notebook, I get an error message.
import twint
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-5772b804c290> in <module>
----> 1 import twint
ModuleNotFoundError: No module named 'twint'
But I know twint
is installed allright.
C:Usersmy_user>pip show twint
Name: twint
Version: 2.1.20
Summary: An advanced Twitter scraping & OSINT tool.
Home-page: https://github.com/twintproject/twint
Author: Cody Zacharias
Author-email: [email protected]
License: MIT
Location: c:usersmy_userappdatalocalprogramspythonpython39libsite-packages
Requires: beautifulsoup4, pysocks, aiohttp, cchardet, googletransx, schedule, geopy, fake-
useragent, aiohttp-socks, elasticsearch, pandas, aiodns
Required-by:
I’ve looked at Python "ImportError: No module named twint" on Atom trying to use twint (Python Module), and I know I don’t have two versions of python installed.
How do I move forward? I’d like to use this or a similar module, and not the Twitter API.
Thanks!
2
Answers
I had the same problem trying to start using twint this morning.
It seems that twint is only compatible with python 3.6, whereas I was using a more recent version. I downloaded python 3.6, and ran
in the command line. Seems to work now.
import nest_asyncio
nest_asyncio.apply()
type this before importing twint