问题
I have a Docker container running from tensrflow with Jupyter (Python 3 Kernel) image: erroneousboat/tensorflow-python3-jupyter
This works great and I can access the jupyter notebook from
http://DOCKER_IP:8888
My only issue is that pandas library is not installed. So, I tried to install it on my own. I opened up the docker quickstart terminal and ran:
docker exec CONTAINER_ID apt-get update
docker exec CONTAINER_ID apt-get install -y python3-pandas
The installation succeeds, and yet I still get the ImportError: No module named 'pandas' when I try to import pandas in the jupyter notebook, like so:
import pandas as pd
I also tried installing pandas to the image rather than just my container by:
docker run -it erroneousboat/tensorflow-python3-jupyter /bin/bash
apt-get update
apt-get install -y python3-pandas
exit
Still, in my jupyter notebook, pandas is not recognized. How can I fix this? Thank you!
回答1:
pip install pandas
will install the latest version of pandas for you.
Based on your tags python-3.x
, I assumed pip
belongs to your Python3 version, if you have multiple python versions installed, make sure you have the correct pip.
来源:https://stackoverflow.com/questions/38751406/no-module-named-pandas-jupyter-python3-kernel-tenserflow-through-docker