No module named 'pandas' - Jupyter, Python3 Kernel, Tenserflow through Docker

て烟熏妆下的殇ゞ 提交于 2019-12-11 00:01:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!