tl;dr for Python3
pip3 install Cython
pip3 install pandas
Neither of the other two solutions from Abbas or Jael Woo worked for me for Python3.
I ended up using apt-get install python3-pandas
, but then pip3 install pandas
failed because it said I needed Cython, as it does mention in the Pandas installation docs that it is an "optional dependency" anyways.
That being said, I ran pip3 install Cython
and then ran pip3 install pandas
, and it worked.
Note: Cython and Pandas installation took a while on Ubuntu (unsure of EC2's Ubuntu version) but seemed to be much quicker on Mac 10.11.5
EDIT: using apt-get to install Pandas yielded errors because apt-get installed an older version of Pandas. Once I installed/upgraded Pandas using pip3, the ImportErrors were gone.
Edit: if you care enough to downvote, try adding some constructive criticism to this answer in the form of a comment