1

My apologies in advance - I have read through multiple sites and tried multiple things, but am still having trouble.

On OSX. Am trying to execute "import pandas as pd" in a jupyter notebook with Python 3, but receive the following message: ModuleNotFoundError: No module named 'pandas'

I created a new conda environment

conda create -n py3x python=3

activated it

source activate py3x

then opened jupyter

jupyter notebook

Did not work.

Tried this, but that seemed to default to Python 2: ImportError: No module named 'pandas'

I've also tried (perhaps?) every iteration from the following: Using both Python 2.x and Python 3.x in IPython Notebook

I have python 3 in jupyter notebook now, but none of the packages from anaconda. I also tried updating Anaconda (had already done Anaconda3 graphical install)

conda update anaconda 

And that just said "All requested packages already installed"

Any further thoughts on terminal command lines to help would be much appreciated.

5
  • Did you try conda install jupyter in the newly created environment after activating it? Feb 4, 2017 at 10:14
  • Thanks, Nehal - yes - I did try that. Just tried it again ... source activate py3x (Canopy 64bit) KMB-MacBook-Pro-2:~ kmb$ conda install jupyter pandas Fetching package metadata ......... Solving package specifications: . # All requested packages already installed. # packages in environment at //anaconda: Then, after opening a jupyter notebook and attempting pandas [import pandas as pd], terminal provides: ERROR | No such comm target registered: ipython.widget
    – matthew45
    Feb 5, 2017 at 18:38
  • Yes! Thank you @NehalJWani! It was 100% kernelspec... the path for calling python was pointing to the wrong environment
    – matthew45
    Feb 6, 2017 at 21:07
  • Can I suggest you turn the solution comment as an answer (which can be to your own question) for the benefit of others that meet the same issue.
    – Cam_Aust
    Feb 23, 2017 at 13:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.