-1

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:\Users\my_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: codyzacharias@pm.me
License: MIT
Location: c:\users\my_user\appdata\local\programs\python\python39\lib\site-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!

Jimmy
  • 69
  • 1
  • 10

2 Answers2

1

import nest_asyncio nest_asyncio.apply() type this before importing twint

0

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

python3.6 -m pip install twint

in the command line. Seems to work now.

Reza Rahemtola
  • 1,182
  • 7
  • 16
  • 30
  • Thanks for the help, I created a virtual environment with python 3.6 and twint works beautifully! – Jimmy Jul 14 '21 at 13:31