Reputation: 47
got a new laptop (MacBook Air with Catalina) and installed python 3 thru Homebrew.
When trying to install and run some libraries in a jupyter notebook (also installed thru Homebrew) like:
!pip3 install pandas
and then:
import pandas as pd
I get the error:
ModuleNotFoundError: No module named 'pandas'
Same thing with numpy, matplotlib, bs4, etc. Even though when I rerun the !pip3 install something I get the message:
Requirement already satisfied: numpy in /usr/local/lib/python3.8/site-packages (1.19.2)
When I run:
!which python3
!which pip3
I get
/usr/local/bin/python3
/usr/local/bin/pip3
is there something I'm doing wrong?
Upvotes: 0
Views: 525
Reputation: 47
Problem seemed to be installing jupyter thru homebrew. Uninstalled it, and then reinstalled it with pip and now everything is working
Upvotes: 0
Reputation: 445
I’ve catch like this problem It helped me that:
Uninstall python And install python Then reboot system
I guess your Catalina use 3 version py3 this time It’s need realias
I guess on Mac OS is better to use pip3 by terminal.
Upvotes: 0