0

I hope someone can help me out with the following;

On my mac I have by default Python 2.x. I now have to open Jupyter notebook with Python 3.8 from the terminal. I have already downloaded Python 3.8. I tried python3 -m notebook but this doesn’t seem to work. Does someone know how to do this?

To download pip I used in my terminal:

$ sudo easy_install pip

Using the terminal I installed the package

$ pip install rdflib

then I installed Jupyter notebook in my terminal using:

$ pip install jupyterlab

Thanks!

11
  • Hi YYY, welcome to Stack Overflow. Did you install Jupyter? If so, how did you do it? Commented Sep 7, 2020 at 0:42
  • 1
    What is the output in your terminal after you run python3 -m notebook? Commented Sep 7, 2020 at 1:18
  • @David Z I used: $ pip install jupyterlab in my terminal and before that I already installed pip. Commented Sep 7, 2020 at 4:37
  • 1
    every Python uses own modules - you have to install it with pip3 install ... or python3 -m pip install ... Commented Sep 7, 2020 at 4:55
  • @YYY Thanks, could you edit that information into your question? Commented Sep 7, 2020 at 5:47

1 Answer 1

2

Since Python 2 is the default on your system, it's likely (but not certain) that pip runs the Python 2 version of Pip. You can check by running

$ pip --version

It will print out the Python version that pip works with. If you find that it is Python 2, that means that running pip install to install a package only installs it for Python 2.

In order to make the package available in your default version of Python 3, you'd have to run

pip3 install notebook

I'd guess that for you, the default version of Python 3 is probably Python 3.8, unless you have yet another version of Python 3 installed. If you do, then you might need to run

pip3.8 install notebook

to be completely sure that it gets installed with Python 3.8 rather than whatever other version you have installed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.