3

I know there is a huge number of questions on this topics, but not even one worked for me, not here, not on github.

I have installed anaconda2 for macOS a few days before. I know pandas come with Anaconda by default, and in the last year I haven't any trouble with any python package on Ubuntu, but now I have a weird problem. When I run jupyter notebook and import pandas as pd, I got an error: no module named pandas. It's not just about pandas, none of libraries work.

When I try to install pandas with conda, return me Requirement already satisfied. The same with pip. Also, I have tried to run jupyter notebook with a full path to jupyter package, and doesn't help either. Probably there is a problem with PATH, but I'm not really good with that and not sure what to do.

But everything works fine when I run iPython in terminal, python in terminal, just doesn't work in jupyter notebook.

> python --version
: Python 2.7.15 :: Anaconda, Inc.

> which python :/anaconda2/bin/python

> which jupyter-notebook:
/anaconda2/bin/jupyter-notebook

> conda env list:
 conda environments:
base                  *  /anaconda2

Thanks for any help in advance.

James
  • 32,991
  • 4
  • 47
  • 70
jovicbg
  • 1,523
  • 8
  • 34
  • 74
  • If you run `!which python` in your notebook, do you get the expected interpreter? If not, check if "Kernel -> Change kernel" allows you to pick between different ones. – fuglede Jun 24 '18 at 00:25

1 Answers1

3

Try this in jupyter cell:

!pip install pandas
CezarySzulc
  • 1,849
  • 1
  • 14
  • 30