0

I installed neattext using

$ pip3 install neattext import neattext.functions as nfx throws the ModuleNotFoundError. --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) /var/folders/pl/g5kg5m5d06q_z_dgyvpv_84w0000gn/T/ipykernel_35413/3378150044.py in <module> 1 # Load Text Cleaning Package ----> 2 import neattext.functions as nfx ModuleNotFoundError: No module named 'neattext' 

I uninstalled and reinstalled neattext and in a new terminal restarted jupyter notebook still facing same problem

Trying to install neattext within jupyter cell

$ pip3 install neattext Requirement already satisfied: neattext in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (0.1.3) 

however importing neattext again throws ModuleNotFoundError.

1
  • Seems it could be a problem that I have updated the python version on my laptop to python 3.8 from python 3.7. Jupyter notebook is using python 3.7. WIll see how to sort this problem out. Commented Apr 10, 2023 at 11:10

1 Answer 1

0

It turns out that this is due to the fact that the python version jupyter was running on was 3.7 where as I had installed neattext with python 3.8 version.

Jupyter Notebook can't find modules for python 3.6

I tried the below

pip3 install ipykernel --upgrade

python3 -m ipykernel install --user

and it worked.

However other old packages such as pandas etc needed to be installed again.

Apparently using virtual environments is a solution for such problems. please check threads that discuss how to use virtual env in jupyter notebooks.

If anyone could clarify the use of virtual environments for such version changes that happen always it would be helpful.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.