I have two versions of Python installed in my mac: Python2.7 and python 3.7. When I try to install Pandas using Pip,
pip install pandas
It shows,
Requirement already satisfied: pandas in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.25.0)
Requirement already satisfied: numpy>=1.13.3 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas) (1.17.0)
Requirement already satisfied: python-dateutil>=2.6.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas) (2.8.0)
Requirement already satisfied: pytz>=2017.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas) (2019.1)
Requirement already satisfied: six>=1.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
Upon Importing pandas, it prompts an error: No Module Found.
Raghus-MacBook-Pro:~ Home$ python Python 2.7.16 (default, Aug 6 2019, 11:00:03) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pandas
I have also tried ,
sudo pip install pandas
But it doesn't solve my issue. Pandas gets imported with python3. But i want pandas to be imported with python. Is it the Problem with the Directory? Help me out.