I use the Mac terminal to check my package:
pip list
I can find all packages including Pandas:
But when I
import pandas
it told me:
ModuleNotFoundError: No module named 'pandas'
By the way, I have Python 2 and Python 3 on my Mac. They are not the same directory, and I suspect the Python interpreter didn't find the path of Pandas.
The error “No module named pandas ” will occur when there is no pandas library in your environment IE the pandas module is either not installed or there is an issue while downloading the module right.
First of all, install virtualenv
inside your project folder to secure your project directory to avoid conflict with your other packages.
pip install virtualenv
After installing this, run this command one by one inside your root project directory:
virtualenv venv source venv/bin/activate
Now your directory is secure and you can install your required packages inside.
pip install pandas
and others as you required.
Because you have installed virtualenv
and running as secure, it will not conflict with other outside packages.
Use these all steps one by one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With