2

I'm using Jupyter notebook (without Anaconda) and cannot import packages anymore. I certainly have these packages as it work in Pycharm. I always use Python 3.x but it seems to be trying to use (see picture):

enter image description here

I also cannot switch interpreters within Jupyter as I only have the option of Python 3 (see picture).

enter image description here

I am asking the question as I have read that uninstalling python 2.x could break my system, so I'm hoping there is a simple solution much like you would change interpreters in Pycharm.

Is there a command I can type that will switch interpreters?

Thanks

d789w
  • 357
  • 5
  • 19

2 Answers2

0

Try this supposing you have a windows OS-

  1. upgrade to Jupyter with pip install -U jupyter
  2. install Python3
  3. install Jupyter again using pip3 install jupyter
  4. install Python3 kernel using ipython3 kernelspec install-self

Then, it must work fine.

Else Checkout some valuable Links- StackOverflow Github Issues

Rahul Bordoloi
  • 145
  • 3
  • 9
  • Sorry - forgot to mention I use Mac. I have used homebrew to install jupyter and have uninstalled/reinstalled many times. I also have python 3 already – d789w Jun 13 '20 at 02:51
0

This worked for me:

pip3 install ipykernel --upgrade
python3 -m ipykernel install --user
d789w
  • 357
  • 5
  • 19