Issue
Initially, I ran experiments on python3, which supports Pandas perfectly. Since our lab recently upgraded the server to an RTX 3000 series GPU, it supports Python 3.9, not previous versions. For that, when I ran the tests in python3.9 (python3.9 code file.py), the following error occurred:
ModuleNotFoundError: No module named 'pandas'
Then I ran 'pip install pandas' and found that the requirements had already been met; here's further information:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pandas in ./.local/lib/python3.6/site-packages (1.1.5)
Requirement already satisfied: pytz>=2017.2 in ./.local/lib/python3.6/site-packages (from pandas) (2021.1)
Requirement already satisfied: python-dateutil>=2.7.3 in ./.local/lib/python3.6/site-packages (from pandas) (2.8.2)
Requirement already satisfied: numpy>=1.15.4 in ./.local/lib/python3.6/site-packages (from pandas) (1.19.5)
Requirement already satisfied: six>=1.5 in ./.local/lib/python3.6/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
But when I ran the file again, I received the same issue: ModuleNotFoundError: No module named 'pandas'
How can we install solve this issue?
Solution
According to my understanding, our lab server supports various Python versions, and I was executing my code files from a directory with a Python version of 3.6, which caused the issue. Therefore, we must either change our project directory to Python 3.9 and install Pandas there or use the following command as instructed here.
python3.9 -m pip install pandas
Answered By - Ahmad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.