1

I installed Bokeh into a virtual environment using pip in the terminal. However, when launching a Jupyter notebook server from this virtual environment, and opening a notebook, the version of bokeh (0.12.9) appears different from the version I installed in the terminal (0.13.0).

From the Jupyter notebook server terminal:

pip3 install --upgrade bokeh
...
python3
Python 3.6.4 (default, Mar  9 2018, 23:15:03)
GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bokeh
>>> bokeh.__version__
'0.13.0'

From a new iPython notebook:

import sys
print(sys.version)
import bokeh
print(bokeh.__version__)

>>> 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:14:59) 
>>> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
>>> '0.12.9'

I have checked that the notebook is also running Python 3 (though it is a different version, which seems suspicious...)

How do I upgrade the version of Bokeh that runs in the notebook? The most closely related questions that I can find on Stack Overflow (old sklearn version in Jupyter Notebook, Conflicting python version in jupyter notebook(Conda)) do not seem to work, probably because they are specific to conda, which I do not have installed.

jstelman
  • 36
  • 1
  • 8
  • do you have a another python installed outside of your environment? If yes, type `unset PYTHONPATH` in the terminal, before you start your environment. – gehbiszumeis Sep 24 '18 at 06:17
  • Yes, the fact that Jupyter wasn't getting the "correct" version of Python was the issue. It was connecting to a different kernel. I tried a few things, and ultimately the thing that fixed it was upgrading ipykernel. After that, the virtualenv kernel became visible to Jupyter. Next time, I'll just use conda :) – jstelman Sep 25 '18 at 14:26

0 Answers0