ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 223 forks source link

rbokeh not displaying plots in Jupyter #1391

Closed ijstokes closed 7 years ago

ijstokes commented 7 years ago

Previously this code snippet with an R kernel in Jupyter worked for me in that it resulted in an in-notebook rbokeh plot. Now I get an error.

Here is the code:

library(dplyr)
library(rbokeh)
library(shiny)

z <- lm(dist ~ speed, data = cars)

p <- figure(width = 600, height = 600) %>%
  ly_points(cars, hover = cars) %>%
  ly_lines(lowess(cars), legend = "lowess") %>%
  ly_abline(z, type = 2, legend = "lm")
p

Here is the (new) output error message:

HTML widgets cannot be represented in plain text (need html)

Here is what I previously got out:

screenshot 2017-01-29 11 41 27

And if you care to watch a video version of it (not very illuminating: it is from an online training course, so it takes 2 minutes to go through 2 code cells -- all the action is at the very end):

https://screencast.com/t/jQigxkqJHw

ijstokes commented 7 years ago

These examples are taken directly from the rbokeh GH site: https://hafen.github.io/rbokeh/#background

ijstokes commented 7 years ago

If you want the Notebook I'm using, you can get it here:

https://anaconda.org/ijstokes/7-data-processing-and-visualization-in-r

The problem section is 7.5 -- the first part previously worked inside of Jupyter (the second part is just R code inside Jupyter that needs to be written to files on disk and executed from the CLI, not Jupyter).

mingwandroid commented 7 years ago

Please show the output from: conda list --show-channel-urls

mingwandroid commented 7 years ago

I managed to reproduce this. Investigating now.

mingwandroid commented 7 years ago

This works fine in rstudio's R Notebook feature. This is a useful debugging data-point, and a possible workaround if you are in a pinch and not a resolution for the bug!

ijstokes commented 7 years ago

@mingwandroid I've tried several things to get rbokeh to work -- I really need to find a Python 3.5 package spec that I can publish on Anaconda Cloud so participants in this online training course have a reliable reference set of packages that will work for the R part of the course.

Unfortunately I no longer have my original working environment, but it should have been something identical to or very similar to:

https://anaconda.org/datasciencepythonr/dspyr/files

I've also tried creating a new Python 2.7 Conda environment based on Anaconda 4.2, then installing R 3.3.1 (with r-essentials and r-rbokeh).

But every combo I try has the same issue of r-rbokeh not displaying plots inline in Jupyter.

ijstokes commented 7 years ago
$ conda list --show-channel-urls
# packages in environment at /Users/ijstokes/anaconda/envs/rbokeh:
#
_license                  1.1                      py27_1    defaults
_nb_ext_conf              0.3.0                    py27_0    defaults
alabaster                 0.7.9                    py27_0    defaults
anaconda                  4.2.0               np111py27_0    defaults
anaconda-clean            1.0.0                    py27_0    defaults
anaconda-client           1.5.1                    py27_0    defaults
anaconda-navigator        1.3.1                    py27_0    defaults
appnope                   0.1.0                    py27_0    defaults
appscript                 1.0.1                    py27_0    defaults
argcomplete               1.0.0                    py27_1    defaults
astroid                   1.4.7                    py27_0    defaults
astropy                   1.2.1               np111py27_0    defaults
babel                     2.3.4                    py27_0    defaults
backports                 1.0                      py27_0    defaults
backports_abc             0.4                      py27_0    defaults
beautifulsoup4            4.5.1                    py27_0    defaults
bitarray                  0.8.1                    py27_0    defaults
blaze                     0.10.1                   py27_0    defaults
bokeh                     0.12.2                   py27_0    defaults
boto                      2.42.0                   py27_0    defaults
bottleneck                1.1.0               np111py27_0    defaults
cdecimal                  2.3                      py27_2    defaults
cffi                      1.7.0                    py27_0    defaults
chest                     0.2.3                    py27_0    defaults
click                     6.6                      py27_0    defaults
cloudpickle               0.2.1                    py27_0    defaults
clyent                    1.2.2                    py27_0    defaults
colorama                  0.3.7                    py27_0    defaults
configobj                 5.0.6                    py27_0    defaults
configparser              3.5.0                    py27_0    defaults
contextlib2               0.5.3                    py27_0    defaults
cryptography              1.5                      py27_0    defaults
curl                      7.49.0                        1    defaults
cycler                    0.10.0                   py27_0    defaults
cython                    0.24.1                   py27_0    defaults
cytoolz                   0.8.0                    py27_0    defaults
dask                      0.11.0                   py27_0    defaults
datashape                 0.5.2                    py27_0    defaults
decorator                 4.0.10                   py27_0    defaults
dill                      0.2.5                    py27_0    defaults
docutils                  0.12                     py27_2    defaults
dynd-python               0.7.2                    py27_0    defaults
entrypoints               0.2.2                    py27_0    defaults
enum34                    1.1.6                    py27_0    defaults
et_xmlfile                1.0.1                    py27_0    defaults
fastcache                 1.0.2                    py27_1    defaults
filelock                  2.0.6                    py27_0    defaults
flask                     0.11.1                   py27_0    defaults
flask-cors                2.1.2                    py27_0    defaults
freetype                  2.5.5                         1    defaults
funcsigs                  1.0.2                    py27_0    defaults
functools32               3.2.3.2                  py27_0    defaults
futures                   3.0.5                    py27_0    defaults
get_terminal_size         1.0.0                    py27_0    defaults
gevent                    1.1.2                    py27_0    defaults
greenlet                  0.4.10                   py27_0    defaults
grin                      1.2.1                    py27_3    defaults
gsl                       2.2.1                         0    defaults
h5py                      2.6.0               np111py27_2    defaults
hdf5                      1.8.17                        1    defaults
heapdict                  1.0.0                    py27_1    defaults
icu                       54.1                          0    defaults
idna                      2.1                      py27_0    defaults
imagesize                 0.7.1                    py27_0    defaults
ipaddress                 1.0.16                   py27_0    defaults
ipykernel                 4.5.0                    py27_0    defaults
ipython                   5.1.0                    py27_0    defaults
ipython_genutils          0.1.0                    py27_0    defaults
ipywidgets                5.2.2                    py27_0    defaults
itsdangerous              0.24                     py27_0    defaults
jbig                      2.1                           0    defaults
jdcal                     1.2                      py27_1    defaults
jedi                      0.9.0                    py27_1    defaults
jinja2                    2.8                      py27_1    defaults
jpeg                      8d                            2    defaults
jsonschema                2.5.1                    py27_0    defaults
jupyter                   1.0.0                    py27_3    defaults
jupyter_client            4.4.0                    py27_0    defaults
jupyter_console           5.0.0                    py27_0    defaults
jupyter_core              4.2.0                    py27_0    defaults
lazy-object-proxy         1.2.1                    py27_0    defaults
libdynd                   0.7.2                         0    defaults
libgcc                    4.8.5                         1    defaults
libpng                    1.6.22                        0    defaults
libtiff                   4.0.6                         2    defaults
libxml2                   2.9.2                         0    defaults
libxslt                   1.1.28                        2    defaults
llvmlite                  0.13.0                   py27_0    defaults
locket                    0.2.0                    py27_1    defaults
lxml                      3.6.4                    py27_0    defaults
markupsafe                0.23                     py27_2    defaults
matplotlib                1.5.3               np111py27_0    defaults
mistune                   0.7.3                    py27_1    defaults
mkl                       11.3.3                        0    defaults
mkl-service               1.1.2                    py27_2    defaults
mpmath                    0.19                     py27_1    defaults
multipledispatch          0.4.8                    py27_0    defaults
nb_anacondacloud          1.2.0                    py27_0    defaults
nb_conda                  2.0.0                    py27_0    defaults
nb_conda_kernels          2.0.0                    py27_0    defaults
nbconvert                 4.2.0                    py27_0    defaults
nbformat                  4.1.0                    py27_0    defaults
nbpresent                 3.0.2                    py27_0    defaults
ncurses                   5.9                          10    defaults
networkx                  1.11                     py27_0    defaults
nltk                      3.2.1                    py27_0    defaults
nose                      1.3.7                    py27_1    defaults
notebook                  4.2.3                    py27_0    defaults
numba                     0.28.1              np111py27_0    defaults
numexpr                   2.6.1               np111py27_0    defaults
numpy                     1.11.1                   py27_0    defaults
odo                       0.5.0                    py27_1    defaults
openpyxl                  2.3.2                    py27_0    defaults
openssl                   1.0.2j                        0    defaults
pandas                    0.18.1              np111py27_0    defaults
partd                     0.3.6                    py27_0    defaults
path.py                   8.2.1                    py27_0    defaults
pathlib2                  2.1.0                    py27_0    defaults
patsy                     0.4.1                    py27_0    defaults
pcre                      8.39                          1    defaults
pep8                      1.7.0                    py27_0    defaults
pexpect                   4.0.1                    py27_0    defaults
pickleshare               0.7.4                    py27_0    defaults
pillow                    3.3.1                    py27_0    defaults
pip                       8.1.2                    py27_0    defaults
pkginfo                   1.3.2                    py27_0    defaults
ply                       3.9                      py27_0    defaults
prompt_toolkit            1.0.3                    py27_0    defaults
psutil                    4.3.1                    py27_0    defaults
ptyprocess                0.5.1                    py27_0    defaults
py                        1.4.31                   py27_0    defaults
pyasn1                    0.1.9                    py27_0    defaults
pyaudio                   0.2.7                    py27_0    defaults
pycosat                   0.6.1                    py27_1    defaults
pycparser                 2.14                     py27_1    defaults
pycrypto                  2.6.1                    py27_4    defaults
pycurl                    7.43.0                   py27_0    defaults
pyflakes                  1.3.0                    py27_0    defaults
pygments                  2.1.3                    py27_0    defaults
pylint                    1.5.4                    py27_1    defaults
pyopenssl                 16.0.0                   py27_0    defaults
pyparsing                 2.1.4                    py27_0    defaults
pyqt                      5.6.0                    py27_0    defaults
pytables                  3.2.3.1             np111py27_0    defaults
pytest                    2.9.2                    py27_0    defaults
python                    2.7.12                        1    defaults
python-dateutil           2.5.3                    py27_0    defaults
python.app                1.2                      py27_4    defaults
pytz                      2016.6.1                 py27_0    defaults
pyyaml                    3.12                     py27_0    defaults
pyzmq                     15.4.0                   py27_0    defaults
qt                        5.6.0                         0    defaults
qtawesome                 0.3.3                    py27_0    defaults
qtconsole                 4.2.1                    py27_1    defaults
qtpy                      1.1.2                    py27_0    defaults
r                         3.3.1                  r3.3.1_0    defaults
r-assertthat              0.1                    r3.3.1_4    defaults
r-base                    3.3.1                         0    defaults
r-base64enc               0.1_3                  r3.3.1_0    defaults
r-bh                      1.60.0_2               r3.3.1_0    defaults
r-bitops                  1.0_6                  r3.3.1_2    defaults
r-boot                    1.3_18                 r3.3.1_0    defaults
r-car                     2.1_2                  r3.3.1_0    defaults
r-caret                   6.0_70                 r3.3.1_0    defaults
r-catools                 1.17.1                 r3.3.1_2    defaults
r-chron                   2.3_47                 r3.3.1_0    defaults
r-class                   7.3_14                 r3.3.1_0    defaults
r-cluster                 2.0.4                  r3.3.1_0    defaults
r-codetools               0.2_14                 r3.3.1_0    defaults
r-colorspace              1.2_6                  r3.3.1_0    defaults
r-crayon                  1.3.1                  r3.3.1_0    defaults
r-curl                    0.9.7                  r3.3.1_0    defaults
r-data.table              1.9.6                  r3.3.1_0    defaults
r-dbi                     0.4_1                  r3.3.1_0    defaults
r-devtools                1.11.1                 r3.3.1_0    defaults
r-dichromat               2.0_0                  r3.3.1_2    defaults
r-digest                  0.6.9                  r3.3.1_0    defaults
r-dplyr                   0.4.3                  r3.3.1_0    defaults
r-essentials              1.4.3                  r3.3.1_0    defaults
r-evaluate                0.9                    r3.3.1_0    defaults
r-foreach                 1.4.3                  r3.3.1_0    defaults
r-foreign                 0.8_66                 r3.3.1_0    defaults
r-formatr                 1.4                    r3.3.1_0    defaults
r-ggplot2                 2.1.0                  r3.3.1_0    defaults
r-gistr                   0.3.6                  r3.3.1_0    defaults
r-git2r                   0.15.0                 r3.3.1_0    defaults
r-glmnet                  2.0_5                  r3.3.1_0    defaults
r-gtable                  0.2.0                  r3.3.1_0    defaults
r-hexbin                  1.27.1                 r3.3.1_0    defaults
r-highr                   0.6                    r3.3.1_0    defaults
r-htmltools               0.3.5                  r3.3.1_0    defaults
r-htmlwidgets             0.6                    r3.3.1_0    defaults
r-httpuv                  1.3.3                  r3.3.1_0    defaults
r-httr                    1.2.0                  r3.3.1_0    defaults
r-irdisplay               0.4.3                  r3.3.1_2    defaults
r-irkernel                0.7                    r3.3.1_2    defaults
r-iterators               1.0.8                  r3.3.1_0    defaults
r-jsonlite                0.9.22                 r3.3.1_0    defaults
r-kernsmooth              2.23_15                r3.3.1_0    defaults
r-knitr                   1.13                   r3.3.1_0    defaults
r-labeling                0.3                    r3.3.1_2    defaults
r-lattice                 0.20_33                r3.3.1_0    defaults
r-lazyeval                0.2.0                  r3.3.1_0    defaults
r-lme4                    1.1_12                 r3.3.1_0    defaults
r-magrittr                1.5                    r3.3.1_2    defaults
r-maps                    3.1.0                  r3.3.1_0    defaults
r-markdown                0.7.7                  r3.3.1_2    defaults
r-mass                    7.3_45                 r3.3.1_0    defaults
r-matrix                  1.2_6                  r3.3.1_0    defaults
r-matrixmodels            0.4_1                  r3.3.1_0    defaults
r-memoise                 1.0.0                  r3.3.1_0    defaults
r-mgcv                    1.8_12                 r3.3.1_0    defaults
r-mime                    0.4                    r3.3.1_0    defaults
r-minqa                   1.2.4                  r3.3.1_2    defaults
r-munsell                 0.4.3                  r3.3.1_0    defaults
r-nlme                    3.1_128                r3.3.1_0    defaults
r-nloptr                  1.0.4                  r3.3.1_2    defaults
r-nnet                    7.3_12                 r3.3.1_0    defaults
r-nycflights13            0.2.0                  r3.3.1_0    defaults
r-openssl                 0.9.4                  r3.3.1_0    defaults
r-pbdzmq                  0.2_3                  r3.3.1_0    defaults
r-pbkrtest                0.4_6                  r3.3.1_0    defaults
r-plyr                    1.8.4                  r3.3.1_0    defaults
r-pryr                    0.1.2                  r3.3.1_0    defaults
r-quantmod                0.4_5                  r3.3.1_2    defaults
r-quantreg                5.26                   r3.3.1_0    defaults
r-r6                      2.1.2                  r3.3.1_0    defaults
r-randomforest            4.6_12                 r3.3.1_0    defaults
r-rbokeh                  0.4.2                  r3.3.1_0    defaults
r-rcolorbrewer            1.1_2                  r3.3.1_3    defaults
r-rcpp                    0.12.5                 r3.3.1_0    defaults
r-rcppeigen               0.3.2.8.1              r3.3.1_0    defaults
r-recommended             3.3.1                  r3.3.1_0    defaults
r-repr                    0.7                    r3.3.1_0    defaults
r-reshape2                1.4.1                  r3.3.1_2    defaults
r-rmarkdown               0.9.6                  r3.3.1_0    defaults
r-rpart                   4.1_10                 r3.3.1_0    defaults
r-rstudioapi              0.5                    r3.3.1_0    defaults
r-scales                  0.4.0                  r3.3.1_0    defaults
r-shiny                   0.13.2                 r3.3.1_0    defaults
r-sparsem                 1.7                    r3.3.1_0    defaults
r-spatial                 7.3_11                 r3.3.1_0    defaults
r-stringi                 1.1.1                  r3.3.1_0    defaults
r-stringr                 1.0.0                  r3.3.1_0    defaults
r-survival                2.39_4                 r3.3.1_0    defaults
r-tibble                  1.0                    r3.3.1_0    defaults
r-tidyr                   0.5.1                  r3.3.1_0    defaults
r-ttr                     0.23_1                 r3.3.1_0    defaults
r-uuid                    0.1_2                  r3.3.1_0    defaults
r-whisker                 0.3_2                  r3.3.1_2    defaults
r-withr                   1.0.2                  r3.3.1_0    defaults
r-xtable                  1.8_2                  r3.3.1_0    defaults
r-xts                     0.9_7                  r3.3.1_2    defaults
r-yaml                    2.1.13                 r3.3.1_2    defaults
r-zoo                     1.7_13                 r3.3.1_0    defaults
readline                  6.2                           2    defaults
redis                     3.2.0                         0    defaults
redis-py                  2.10.5                   py27_0    defaults
requests                  2.11.1                   py27_0    defaults
rope                      0.9.4                    py27_1    defaults
rpy2                      2.8.2              py27r3.3.1_1    defaults
scikit-image              0.12.3              np111py27_1    defaults
scikit-learn              0.17.1              np111py27_2    defaults
scipy                     0.18.1              np111py27_0    defaults
setuptools                27.2.0                   py27_0    defaults
simplegeneric             0.8.1                    py27_1    defaults
singledispatch            3.4.0.3                  py27_0    defaults
sip                       4.18                     py27_0    defaults
six                       1.10.0                   py27_0    defaults
snowballstemmer           1.2.1                    py27_0    defaults
sockjs-tornado            1.0.3                    py27_0    defaults
sphinx                    1.4.6                    py27_0    defaults
spyder                    3.0.0                    py27_0    defaults
sqlalchemy                1.0.13                   py27_0    defaults
sqlite                    3.13.0                        0    defaults
ssl_match_hostname        3.4.0.2                  py27_1    defaults
statsmodels               0.6.1               np111py27_1    defaults
sympy                     1.0                      py27_0    defaults
terminado                 0.6                      py27_0    defaults
tk                        8.5.18                        0    defaults
toolz                     0.8.0                    py27_0    defaults
tornado                   4.4.1                    py27_0    defaults
traitlets                 4.3.0                    py27_0    defaults
unicodecsv                0.14.1                   py27_0    defaults
wcwidth                   0.1.7                    py27_0    defaults
werkzeug                  0.11.11                  py27_0    defaults
wheel                     0.29.0                   py27_0    defaults
widgetsnbextension        1.2.6                    py27_0    defaults
wrapt                     1.10.6                   py27_0    defaults
xlrd                      1.0.0                    py27_0    defaults
xlsxwriter                0.9.3                    py27_0    defaults
xlwings                   0.10.0                   py27_0    defaults
xlwt                      1.1.2                    py27_0    defaults
xz                        5.2.2                         0    defaults
yaml                      0.1.6                         0    defaults
zeromq                    4.1.3                         0    defaults
zlib                      1.2.8                         3    defaults

And if it is more reproducible in this format (I'm not sure that it is, due to lack of channel information), here is the -e version:

$ conda list -e
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
_license=1.1=py27_1
_nb_ext_conf=0.3.0=py27_0
alabaster=0.7.9=py27_0
anaconda=4.2.0=np111py27_0
anaconda-clean=1.0.0=py27_0
anaconda-client=1.5.1=py27_0
anaconda-navigator=1.3.1=py27_0
appnope=0.1.0=py27_0
appscript=1.0.1=py27_0
argcomplete=1.0.0=py27_1
astroid=1.4.7=py27_0
astropy=1.2.1=np111py27_0
babel=2.3.4=py27_0
backports=1.0=py27_0
backports_abc=0.4=py27_0
beautifulsoup4=4.5.1=py27_0
bitarray=0.8.1=py27_0
blaze=0.10.1=py27_0
bokeh=0.12.2=py27_0
boto=2.42.0=py27_0
bottleneck=1.1.0=np111py27_0
cdecimal=2.3=py27_2
cffi=1.7.0=py27_0
chest=0.2.3=py27_0
click=6.6=py27_0
cloudpickle=0.2.1=py27_0
clyent=1.2.2=py27_0
colorama=0.3.7=py27_0
configobj=5.0.6=py27_0
configparser=3.5.0=py27_0
contextlib2=0.5.3=py27_0
cryptography=1.5=py27_0
curl=7.49.0=1
cycler=0.10.0=py27_0
cython=0.24.1=py27_0
cytoolz=0.8.0=py27_0
dask=0.11.0=py27_0
datashape=0.5.2=py27_0
decorator=4.0.10=py27_0
dill=0.2.5=py27_0
docutils=0.12=py27_2
dynd-python=0.7.2=py27_0
entrypoints=0.2.2=py27_0
enum34=1.1.6=py27_0
et_xmlfile=1.0.1=py27_0
fastcache=1.0.2=py27_1
filelock=2.0.6=py27_0
flask=0.11.1=py27_0
flask-cors=2.1.2=py27_0
freetype=2.5.5=1
funcsigs=1.0.2=py27_0
functools32=3.2.3.2=py27_0
futures=3.0.5=py27_0
get_terminal_size=1.0.0=py27_0
gevent=1.1.2=py27_0
greenlet=0.4.10=py27_0
grin=1.2.1=py27_3
gsl=2.2.1=0
h5py=2.6.0=np111py27_2
hdf5=1.8.17=1
heapdict=1.0.0=py27_1
icu=54.1=0
idna=2.1=py27_0
imagesize=0.7.1=py27_0
ipaddress=1.0.16=py27_0
ipykernel=4.5.0=py27_0
ipython=5.1.0=py27_0
ipython_genutils=0.1.0=py27_0
ipywidgets=5.2.2=py27_0
itsdangerous=0.24=py27_0
jbig=2.1=0
jdcal=1.2=py27_1
jedi=0.9.0=py27_1
jinja2=2.8=py27_1
jpeg=8d=2
jsonschema=2.5.1=py27_0
jupyter=1.0.0=py27_3
jupyter_client=4.4.0=py27_0
jupyter_console=5.0.0=py27_0
jupyter_core=4.2.0=py27_0
lazy-object-proxy=1.2.1=py27_0
libdynd=0.7.2=0
libgcc=4.8.5=1
libpng=1.6.22=0
libtiff=4.0.6=2
libxml2=2.9.2=0
libxslt=1.1.28=2
llvmlite=0.13.0=py27_0
locket=0.2.0=py27_1
lxml=3.6.4=py27_0
markupsafe=0.23=py27_2
matplotlib=1.5.3=np111py27_0
mistune=0.7.3=py27_1
mkl=11.3.3=0
mkl-service=1.1.2=py27_2
mpmath=0.19=py27_1
multipledispatch=0.4.8=py27_0
nb_anacondacloud=1.2.0=py27_0
nb_conda=2.0.0=py27_0
nb_conda_kernels=2.0.0=py27_0
nbconvert=4.2.0=py27_0
nbformat=4.1.0=py27_0
nbpresent=3.0.2=py27_0
ncurses=5.9=10
networkx=1.11=py27_0
nltk=3.2.1=py27_0
nose=1.3.7=py27_1
notebook=4.2.3=py27_0
numba=0.28.1=np111py27_0
numexpr=2.6.1=np111py27_0
numpy=1.11.1=py27_0
odo=0.5.0=py27_1
openpyxl=2.3.2=py27_0
openssl=1.0.2j=0
pandas=0.18.1=np111py27_0
partd=0.3.6=py27_0
path.py=8.2.1=py27_0
pathlib2=2.1.0=py27_0
patsy=0.4.1=py27_0
pcre=8.39=1
pep8=1.7.0=py27_0
pexpect=4.0.1=py27_0
pickleshare=0.7.4=py27_0
pillow=3.3.1=py27_0
pip=8.1.2=py27_0
pkginfo=1.3.2=py27_0
ply=3.9=py27_0
prompt_toolkit=1.0.3=py27_0
psutil=4.3.1=py27_0
ptyprocess=0.5.1=py27_0
py=1.4.31=py27_0
pyasn1=0.1.9=py27_0
pyaudio=0.2.7=py27_0
pycosat=0.6.1=py27_1
pycparser=2.14=py27_1
pycrypto=2.6.1=py27_4
pycurl=7.43.0=py27_0
pyflakes=1.3.0=py27_0
pygments=2.1.3=py27_0
pylint=1.5.4=py27_1
pyopenssl=16.0.0=py27_0
pyparsing=2.1.4=py27_0
pyqt=5.6.0=py27_0
pytables=3.2.3.1=np111py27_0
pytest=2.9.2=py27_0
python=2.7.12=1
python-dateutil=2.5.3=py27_0
python.app=1.2=py27_4
pytz=2016.6.1=py27_0
pyyaml=3.12=py27_0
pyzmq=15.4.0=py27_0
qt=5.6.0=0
qtawesome=0.3.3=py27_0
qtconsole=4.2.1=py27_1
qtpy=1.1.2=py27_0
r=3.3.1=r3.3.1_0
r-assertthat=0.1=r3.3.1_4
r-base=3.3.1=0
r-base64enc=0.1_3=r3.3.1_0
r-bh=1.60.0_2=r3.3.1_0
r-bitops=1.0_6=r3.3.1_2
r-boot=1.3_18=r3.3.1_0
r-car=2.1_2=r3.3.1_0
r-caret=6.0_70=r3.3.1_0
r-catools=1.17.1=r3.3.1_2
r-chron=2.3_47=r3.3.1_0
r-class=7.3_14=r3.3.1_0
r-cluster=2.0.4=r3.3.1_0
r-codetools=0.2_14=r3.3.1_0
r-colorspace=1.2_6=r3.3.1_0
r-crayon=1.3.1=r3.3.1_0
r-curl=0.9.7=r3.3.1_0
r-data.table=1.9.6=r3.3.1_0
r-dbi=0.4_1=r3.3.1_0
r-devtools=1.11.1=r3.3.1_0
r-dichromat=2.0_0=r3.3.1_2
r-digest=0.6.9=r3.3.1_0
r-dplyr=0.4.3=r3.3.1_0
r-essentials=1.4.3=r3.3.1_0
r-evaluate=0.9=r3.3.1_0
r-foreach=1.4.3=r3.3.1_0
r-foreign=0.8_66=r3.3.1_0
r-formatr=1.4=r3.3.1_0
r-ggplot2=2.1.0=r3.3.1_0
r-gistr=0.3.6=r3.3.1_0
r-git2r=0.15.0=r3.3.1_0
r-glmnet=2.0_5=r3.3.1_0
r-gtable=0.2.0=r3.3.1_0
r-hexbin=1.27.1=r3.3.1_0
r-highr=0.6=r3.3.1_0
r-htmltools=0.3.5=r3.3.1_0
r-htmlwidgets=0.6=r3.3.1_0
r-httpuv=1.3.3=r3.3.1_0
r-httr=1.2.0=r3.3.1_0
r-irdisplay=0.4.3=r3.3.1_2
r-irkernel=0.7=r3.3.1_2
r-iterators=1.0.8=r3.3.1_0
r-jsonlite=0.9.22=r3.3.1_0
r-kernsmooth=2.23_15=r3.3.1_0
r-knitr=1.13=r3.3.1_0
r-labeling=0.3=r3.3.1_2
r-lattice=0.20_33=r3.3.1_0
r-lazyeval=0.2.0=r3.3.1_0
r-lme4=1.1_12=r3.3.1_0
r-magrittr=1.5=r3.3.1_2
r-maps=3.1.0=r3.3.1_0
r-markdown=0.7.7=r3.3.1_2
r-mass=7.3_45=r3.3.1_0
r-matrix=1.2_6=r3.3.1_0
r-matrixmodels=0.4_1=r3.3.1_0
r-memoise=1.0.0=r3.3.1_0
r-mgcv=1.8_12=r3.3.1_0
r-mime=0.4=r3.3.1_0
r-minqa=1.2.4=r3.3.1_2
r-munsell=0.4.3=r3.3.1_0
r-nlme=3.1_128=r3.3.1_0
r-nloptr=1.0.4=r3.3.1_2
r-nnet=7.3_12=r3.3.1_0
r-nycflights13=0.2.0=r3.3.1_0
r-openssl=0.9.4=r3.3.1_0
r-pbdzmq=0.2_3=r3.3.1_0
r-pbkrtest=0.4_6=r3.3.1_0
r-plyr=1.8.4=r3.3.1_0
r-pryr=0.1.2=r3.3.1_0
r-quantmod=0.4_5=r3.3.1_2
r-quantreg=5.26=r3.3.1_0
r-r6=2.1.2=r3.3.1_0
r-randomforest=4.6_12=r3.3.1_0
r-rbokeh=0.4.2=r3.3.1_0
r-rcolorbrewer=1.1_2=r3.3.1_3
r-rcpp=0.12.5=r3.3.1_0
r-rcppeigen=0.3.2.8.1=r3.3.1_0
r-recommended=3.3.1=r3.3.1_0
r-repr=0.7=r3.3.1_0
r-reshape2=1.4.1=r3.3.1_2
r-rmarkdown=0.9.6=r3.3.1_0
r-rpart=4.1_10=r3.3.1_0
r-rstudioapi=0.5=r3.3.1_0
r-scales=0.4.0=r3.3.1_0
r-shiny=0.13.2=r3.3.1_0
r-sparsem=1.7=r3.3.1_0
r-spatial=7.3_11=r3.3.1_0
r-stringi=1.1.1=r3.3.1_0
r-stringr=1.0.0=r3.3.1_0
r-survival=2.39_4=r3.3.1_0
r-tibble=1.0=r3.3.1_0
r-tidyr=0.5.1=r3.3.1_0
r-ttr=0.23_1=r3.3.1_0
r-uuid=0.1_2=r3.3.1_0
r-whisker=0.3_2=r3.3.1_2
r-withr=1.0.2=r3.3.1_0
r-xtable=1.8_2=r3.3.1_0
r-xts=0.9_7=r3.3.1_2
r-yaml=2.1.13=r3.3.1_2
r-zoo=1.7_13=r3.3.1_0
readline=6.2=2
redis=3.2.0=0
redis-py=2.10.5=py27_0
requests=2.11.1=py27_0
rope=0.9.4=py27_1
rpy2=2.8.2=py27r3.3.1_1
scikit-image=0.12.3=np111py27_1
scikit-learn=0.17.1=np111py27_2
scipy=0.18.1=np111py27_0
setuptools=27.2.0=py27_0
simplegeneric=0.8.1=py27_1
singledispatch=3.4.0.3=py27_0
sip=4.18=py27_0
six=1.10.0=py27_0
snowballstemmer=1.2.1=py27_0
sockjs-tornado=1.0.3=py27_0
sphinx=1.4.6=py27_0
spyder=3.0.0=py27_0
sqlalchemy=1.0.13=py27_0
sqlite=3.13.0=0
ssl_match_hostname=3.4.0.2=py27_1
statsmodels=0.6.1=np111py27_1
sympy=1.0=py27_0
terminado=0.6=py27_0
tk=8.5.18=0
toolz=0.8.0=py27_0
tornado=4.4.1=py27_0
traitlets=4.3.0=py27_0
unicodecsv=0.14.1=py27_0
wcwidth=0.1.7=py27_0
werkzeug=0.11.11=py27_0
wheel=0.29.0=py27_0
widgetsnbextension=1.2.6=py27_0
wrapt=1.10.6=py27_0
xlrd=1.0.0=py27_0
xlsxwriter=0.9.3=py27_0
xlwings=0.10.0=py27_0
xlwt=1.1.2=py27_0
xz=5.2.2=0
yaml=0.1.6=0
zeromq=4.1.3=0
zlib=1.2.8=3
mingwandroid commented 7 years ago

@ijstokes this is pretty urgent I guess? The online course is 'live' but broken? Do people always use macOS for these courses? I guess not!

bryevdv commented 7 years ago

Ping @hafen

ijstokes commented 7 years ago

@mingwandroid It is "this week urgent" not "today urgent". The only reason I'd escalate it further is if it had some impact on the Anaconda 4.3 release, but I do not believe that is the case.

The course is not available online yet, but we're trying to get it out ASAP (it was supposed to be released a week or two ago) but I've had delays, like this, in completing the content review and confirming everything is good to go.

mingwandroid commented 7 years ago

OK, well, I think I've done all my Anaconda 4.3 work now, @csoja may confirm that. I'm looking at this currently anyway. I'm trying to see if I can get something to work with the r-3.3.1 set of packages for now.

ijstokes commented 7 years ago

@mingwandroid much appreciated. LMK if I can provide any further details. The next step (if I had time) would be to roll back to Anaconda 4.1 and try to explicitly pull old r-rbokeh packages (pre November 2016). I just haven't had time to go to that degree of effort.

mingwandroid commented 7 years ago

No problem, I spent a while trying different versions of R to no avail and I need to get more familiar with debugging R package problems. What better way to do that than investigating one that involves R, Javascript and Bokeh?

Interestingly, your testcase works perfectly fine in both RStudio and from the terminal (where a html file is created and launched in the browser). I need to figure out how Jupyter changes the behaviour. I will keep you posted.

ijstokes commented 7 years ago

I promise this worked fine in mid November, so perhaps regressing to an earlier Jupyter version?

bryevdv commented 7 years ago

I still think that's the best suggestion. If you haven't tried whatever version of the notebook worked back then, that's the first thing I would suggest.

hafen commented 7 years ago

Interesting. I tested this out last month and it worked for me. Just tested again and the examples worked.

mingwandroid commented 7 years ago

It seems to be somewhere between repr, IRdisplay and IRkernel.

damianavila commented 7 years ago

@ijstokes I tried to look into the notebook you referenced and I can not see it at anaconad.org. Can you give me access? Thanks!

mingwandroid commented 7 years ago

I discovered that notebook doesn't include ipywidgets and I hoped that might be the problem. It didn't fix it, but I assume we'd need that for rbokeh to work right?

mingwandroid commented 7 years ago

Here is another reproducer:

library(rbokeh)
library(dplyr)
figure() %>% ly_points(Sepal.Length, Sepal.Width, data = iris, color = Species, glyph = Species, hover = list(Sepal.Length, Sepal.Width))
ijstokes commented 7 years ago

@damianavila here is the notebook: https://anaconda.org/datasciencepythonr/7-data-processing-and-visualization-in-r/notebook -- confirmed that it is public access.

@hafen could you please attach or embed the output of conda list -e into this issue so we can do a diff between your working setup and the ones @mingwandroid and I have that are not working?

That won't catch everything (because it won't include anything that has been installed using the conventional > install.packages('...') but it will give us a good start. I don't know enough about R to know how to get a list of R's idea of which packages are installed, but if you know how to do that if you could include that as well (with versions) that would be super duper.

mingwandroid commented 7 years ago

I've now figured ways to debug R stuff, but I'm far from my home turf here, and it's a bit clunky so any pointers from anyone would be appreciated. Right now, I've figured out how to debug in RStudio, but the problem doesn't actually occour in RStudio so it's not the ideal scenario.

sessionInfo() from within a working Jupyter R kernel would be helpful I think.

bryevdv commented 7 years ago

I discovered that notebook doesn't include ipywidgets and I hoped that might be the problem. It didn't fix it, but I assume we'd need that for rbokeh to work right?

I don't think that's the case. Bokeh does not depend on ipywidgets in the python notebook, and HTMLWidgets AFAIK is a distinct thing, from the R world.

hafen commented 7 years ago

Here's all my info:

$ conda list -e
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
_license=1.1=py35_1
_nb_ext_conf=0.3.0=py35_0
alabaster=0.7.9=py35_0
anaconda=4.2.0=np111py35_0
anaconda-clean=1.0.0=py35_0
anaconda-client=1.5.1=py35_0
anaconda-navigator=1.3.1=py35_0
appnope=0.1.0=py35_0
appscript=1.0.1=py35_0
argcomplete=1.0.0=py35_1
astroid=1.4.7=py35_0
astropy=1.2.1=np111py35_0
babel=2.3.4=py35_0
backports=1.0=py35_0
beautifulsoup4=4.5.1=py35_0
bitarray=0.8.1=py35_0
blaze=0.10.1=py35_0
bokeh=0.12.3=py_1
boto=2.42.0=py35_0
bottleneck=1.1.0=np111py35_0
cffi=1.7.0=py35_0
chest=0.2.3=py35_0
click=6.6=py35_0
cloudpickle=0.2.1=py35_0
clyent=1.2.2=py35_0
colorama=0.3.7=py35_0
conda=4.2.13=py35_0
conda-build=2.0.2=py35_0
conda-env=2.6.0=0
configobj=5.0.6=py35_0
contextlib2=0.5.3=py35_0
cryptography=1.5=py35_0
curl=7.49.0=1
cycler=0.10.0=py35_0
cython=0.24.1=py35_0
cytoolz=0.8.0=py35_0
dask=0.11.0=py35_0
datashape=0.5.2=py35_0
decorator=4.0.10=py35_0
dill=0.2.5=py35_0
docutils=0.12=py35_2
dynd-python=0.7.2=py35_0
entrypoints=0.2.2=py35_0
et_xmlfile=1.0.1=py35_0
fastcache=1.0.2=py35_1
filelock=2.0.6=py35_0
flask=0.11.1=py35_0
flask-cors=2.1.2=py35_0
freetype=2.5.5=1
futures-compat=1.0=py3_0
get_terminal_size=1.0.0=py35_0
gevent=1.1.2=py35_0
greenlet=0.4.10=py35_0
h5py=2.6.0=np111py35_2
hdf5=1.8.17=1
heapdict=1.0.0=py35_1
icu=54.1=0
idna=2.1=py35_0
imagesize=0.7.1=py35_0
ipykernel=4.5.0=py35_0
ipython=5.1.0=py35_0
ipython_genutils=0.1.0=py35_0
ipywidgets=5.2.2=py35_0
itsdangerous=0.24=py35_0
jbig=2.1=0
jdcal=1.2=py35_1
jedi=0.9.0=py35_1
jinja2=2.8=py35_1
jpeg=8d=2
jsonschema=2.5.1=py35_0
jupyter=1.0.0=py35_3
jupyter_client=4.4.0=py35_0
jupyter_console=5.0.0=py35_0
jupyter_core=4.2.0=py35_0
lazy-object-proxy=1.2.1=py35_0
libdynd=0.7.2=0
libpng=1.6.22=0
libtiff=4.0.6=2
libxml2=2.9.2=0
libxslt=1.1.28=2
llvmlite=0.13.0=py35_0
locket=0.2.0=py35_1
lxml=3.6.4=py35_0
markupsafe=0.23=py35_2
matplotlib=1.5.3=np111py35_0
mistune=0.7.3=py35_1
mkl=11.3.3=0
mkl-service=1.1.2=py35_2
mpmath=0.19=py35_1
multipledispatch=0.4.8=py35_0
nb_anacondacloud=1.2.0=py35_0
nb_conda=2.0.0=py35_0
nb_conda_kernels=2.0.0=py35_0
nbconvert=4.2.0=py35_0
nbformat=4.1.0=py35_0
nbpresent=3.0.2=py35_0
networkx=1.11=py35_0
nltk=3.2.1=py35_0
nose=1.3.7=py35_1
notebook=4.2.3=py35_0
numba=0.28.1=np111py35_0
numexpr=2.6.1=np111py35_0
numpy=1.11.1=py35_0
odo=0.5.0=py35_1
openpyxl=2.3.2=py35_0
openssl=1.0.2j=0
pandas=0.18.1=np111py35_0
partd=0.3.6=py35_0
path.py=8.2.1=py35_0
pathlib2=2.1.0=py35_0
patsy=0.4.1=py35_0
pep8=1.7.0=py35_0
pexpect=4.0.1=py35_0
pickleshare=0.7.4=py35_0
pillow=3.3.1=py35_0
pip=8.1.2=py35_0
pkginfo=1.3.2=py35_0
ply=3.9=py35_0
prompt_toolkit=1.0.3=py35_0
psutil=4.3.1=py35_0
ptyprocess=0.5.1=py35_0
py=1.4.31=py35_0
pyasn1=0.1.9=py35_0
pycosat=0.6.1=py35_1
pycparser=2.14=py35_1
pycrypto=2.6.1=py35_4
pycurl=7.43.0=py35_0
pyflakes=1.3.0=py35_0
pygments=2.1.3=py35_0
pylint=1.5.4=py35_1
pyopenssl=16.0.0=py35_0
pyparsing=2.1.4=py35_0
pyqt=5.6.0=py35_0
pytables=3.2.3.1=np111py35_0
pytest=2.9.2=py35_0
python=3.5.2=0
python-dateutil=2.5.3=py35_0
python.app=1.2=py35_4
pytz=2016.6.1=py35_0
pyyaml=3.12=py35_0
pyzmq=15.4.0=py35_0
qt=5.6.0=0
qtawesome=0.3.3=py35_0
qtconsole=4.2.1=py35_1
qtpy=1.1.2=py35_0
readline=6.2=2
redis=3.2.0=0
redis-py=2.10.5=py35_0
requests=2.11.1=py35_0
rope=0.9.4=py35_1
ruamel_yaml=0.11.14=py35_0
scikit-image=0.12.3=np111py35_1
scikit-learn=0.17.1=np111py35_2
scipy=0.18.1=np111py35_0
setuptools=27.2.0=py35_0
simplegeneric=0.8.1=py35_1
singledispatch=3.4.0.3=py35_0
sip=4.18=py35_0
six=1.10.0=py35_0
snowballstemmer=1.2.1=py35_0
sockjs-tornado=1.0.3=py35_0
sphinx=1.4.6=py35_0
spyder=3.0.0=py35_0
sqlalchemy=1.0.13=py35_0
sqlite=3.13.0=0
statsmodels=0.6.1=np111py35_1
sympy=1.0=py35_0
terminado=0.6=py35_0
tk=8.5.18=0
toolz=0.8.0=py35_0
tornado=4.4.1=py35_0
traitlets=4.3.0=py35_0
unicodecsv=0.14.1=py35_0
wcwidth=0.1.7=py35_0
werkzeug=0.11.11=py35_0
wheel=0.29.0=py35_0
widgetsnbextension=1.2.6=py35_0
wrapt=1.10.6=py35_0
xlrd=1.0.0=py35_0
xlsxwriter=0.9.3=py35_0
xlwings=0.10.0=py35_0
xlwt=1.1.2=py35_0
xz=5.2.2=0
yaml=0.1.6=0
zlib=1.2.8=3

R:

> sessionInfo()

R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.2

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_0.14.2 rbokeh_0.5.0 dplyr_0.5.0 

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.9       pryr_0.1.2        plyr_1.8.4        tools_3.3.2      
 [5] digest_0.6.11     uuid_0.1-2        jsonlite_1.2      evaluate_0.10    
 [9] tibble_1.2        lattice_0.20-34   IRdisplay_0.4.4   DBI_0.5-1        
[13] yaml_2.1.14       IRkernel_0.7.1    hexbin_1.27.1     repr_0.10        
[17] httr_1.2.1        stringr_1.1.0     knitr_1.15.1      htmlwidgets_0.8  
[21] maps_3.1.1        grid_3.3.2        R6_2.2.0          rmarkdown_1.1    
[25] pbdZMQ_0.2-5      gistr_0.3.6       magrittr_1.5      scales_0.4.1.9000
[29] codetools_0.2-15  htmltools_0.3.5   assertthat_0.1    mime_0.5         
[33] colorspace_1.3-0  xtable_1.8-2      httpuv_1.3.3      stringi_1.1.2    
[37] lazyeval_0.2.0    munsell_0.4.3     crayon_1.3.2  
screen shot 2017-01-31 at 8 28 22 am
mingwandroid commented 7 years ago

Thanks for those details.

ijstokes commented 7 years ago

OK, so this still doesn't work with Anaconda 4.3 virgin install + r-essentials. I also tried a "minimal" setup using the Conda spec that @hafen provided and then on top of that I did conda install r-rbokeh r-irkernel and still no luck. Same error message:

HTML widgets cannot be represented in plain text (need html)
ijstokes commented 7 years ago

I think next step I think is to try and install rbokeh through standard R mechanisms.

hafen commented 7 years ago

Can you print the results of sessionInfo() in your notebook after loading rbokeh and compare it to my output above? My guess now is that a dependency of rbokeh doesn't have its git tags up to date so conda is installing an older version (I don't know enough about conda but recall it uses tags to register R package versions). In that case you can either install.packages("rbokeh") to see if that gets you the latest dependencies or contact the author of the problematic package to update tags.

mingwandroid commented 7 years ago
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin11.4.2 (64-bit)
Running under: OS X Mavericks 10.9.5

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rbokeh_0.5.0 dplyr_0.5.0 

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.8      knitr_1.15.1     magrittr_1.5     maps_3.1.1      
 [5] munsell_0.4.3    uuid_0.1-2       colorspace_1.3-1 lattice_0.20-34 
 [9] R6_2.2.0         plyr_1.8.4       stringr_1.1.0    httr_1.2.1      
[13] tools_3.3.2      grid_3.3.2       DBI_0.5-1        gistr_0.3.6     
[17] htmltools_0.3.5  yaml_2.1.14      lazyeval_0.2.0   assertthat_0.1  
[21] digest_0.6.10    rprojroot_1.1    tibble_1.2       crayon_1.3.2    
[25] IRdisplay_0.4.4  pryr_0.1.2       repr_0.10        codetools_0.2-15
[29] htmlwidgets_0.8  IRkernel_0.7.1   evaluate_0.10    rmarkdown_1.2   
[33] pbdZMQ_0.2-4     stringi_1.1.2    scales_0.4.1     backports_1.0.4 
[37] jsonlite_1.1     hexbin_1.27.1   
mingwandroid commented 7 years ago

conda fetches most things from CRAN but a lot of the Jupyter related stuff from github. The tags seem ok.

I'm going to try install.packages() on all the things one at a time to see if any individual one fixes it.

Here's a traceback for when it goes wrong:

39: traceback(1) at repr_htmlwidget.r#11
38: repr_text.htmlwidget(obj) at generics.r#29
37: mime2repr[[mime]](obj)
36: withCallingHandlers({
        rpr <- mime2repr[[mime]](obj)
        if (is.null(rpr))
            return(NULL)
        prepare_content(is.raw(rpr), rpr)
    }, error = error_handler)
35: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
33: tryCatchList(expr, classes, parentenv, handlers)
32: tryCatch(withCallingHandlers({
        rpr <- mime2repr[[mime]](obj)
        if (is.null(rpr))
            return(NULL)
        prepare_content(is.raw(rpr), rpr)
    }, error = error_handler), error = outer_handler)
31: FUN(X[[i]], ...)
30: lapply(X = X, FUN = FUN, ...)
29: sapply(x, f, simplify = simplify)
28: lapply(x, f)
27: unlist(lapply(x, f))
26: Filter(Negate(is.null), sapply(x, f, simplify = simplify))
25: filter_map(mimetypes, function(mime) {
        tryCatch(withCallingHandlers({
            rpr <- mime2repr[[mime]](obj)
            if (is.null(rpr))
                return(NULL)
            prepare_content(is.raw(rpr), rpr)
        }, error = error_handler), error = outer_handler)
    })
24: prepare_mimebundle(obj, "text/plain", error_handler = handle_display_error)
23: prepare_mimebundle_kernel(obj, .self$handle_display_error)
22: value_fun(ev$value, ev$visible)
21: withVisible(value_fun(ev$value, ev$visible))
20: withCallingHandlers(withVisible(value_fun(ev$value, ev$visible)),
        warning = wHandler, error = eHandler, message = mHandler)
19: doTryCatch(return(expr), name, parentenv, handler)
18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
17: tryCatchList(expr, classes, parentenv, handlers)
16: tryCatch(expr, error = function(e) {
        call <- conditionCall(e)
        if (!is.null(call)) {
            if (identical(call[[1L]], quote(doTryCatch)))
                call <- sys.call(-4L)
            dcall <- deparse(call)[1L]
            prefix <- paste("Error in", dcall, ": ")
            LONG <- 75L
            msg <- conditionMessage(e)
            sm <- strsplit(msg, "\n")[[1L]]
            w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
            if (is.na(w))
                w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
                    type = "b")
            if (w > LONG)
                prefix <- paste0(prefix, "\n  ")
        }
        else prefix <- "Error : "
        msg <- paste0(prefix, conditionMessage(e), "\n")
        .Internal(seterrmessage(msg[1L]))
        if (!silent && identical(getOption("show.error.messages"),
            TRUE)) {
            cat(msg, file = stderr())
            .Internal(printDeferredWarnings())
        }
        invisible(structure(msg, class = "try-error", condition = e))
    })
15: try(f, silent = TRUE)
14: handle(pv <- withCallingHandlers(withVisible(value_fun(ev$value,
        ev$visible)), warning = wHandler, error = eHandler, message = mHandler))
13: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
        debug = debug, last = i == length(out), use_try = stop_on_error !=
            2L, keep_warning = keep_warning, keep_message = keep_message,
        output_handler = output_handler, include_timing = include_timing)
12: evaluate(request$content$code, envir = .GlobalEnv, output_handler = oh,
        stop_on_error = 1L)
11: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
8: doTryCatch(return(expr), name, parentenv, handler)
7: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
       names[nh], parentenv, handlers[[nh]])
6: tryCatchList(expr, classes, parentenv, handlers)
5: tryCatch(evaluate(request$content$code, envir = .GlobalEnv, output_handler = oh,
       stop_on_error = 1L), interrupt = function(cond) interrupted <<- TRUE,
       error = .self$handle_error)
4: executor$execute(msg)
3: handle_shell()
2: kernel$run()
1: IRkernel::main()
mingwandroid commented 7 years ago

@bryevdv

I don't think that's the case. Bokeh does not depend on ipywidgets in the python notebook, and HTMLWidgets AFAIK is a distinct thing, from the R world.

Thanks, what about widgetsnbextension? Is that also not required here? I installed it anyway, and jupyter gives me the following warning:

[W 10:23:29.500 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20170201102322 (::1) 11.08ms referer=http://localhost:8889/notebooks/Untitled.ipynb

.. and sure enough, I don't have that file in that location. Here's what I do have (excluding the pkgs cache):

$ find $CONDA_PREFIX -name "extension.js"
/Users/ray/rtest/lib/python3.5/site-packages/widgetsnbextension/static/extension.js
/Users/ray/rtest/share/jupyter/nbextensions/jupyter-js-widgets/extension.js

Doing the following:

$ mkdir -p $CONDA_PREFIX/share/jupyter/nbextensions/widgets/notebook/js
$ cp $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-js-widgets/extension.js $CONDA_PREFIX/share/jupyter/nbextensions/widgets/notebook/js/

.. made the warning go away (but not unfortunately HTML widgets cannot be represented in plain text (need html)) . Should I file a bug about this?

bryevdv commented 7 years ago

Thanks, what about widgetsnbextension?

I don't know, I'm afraid. Nothing python bokeh uses. Maybe that is an HTMLWidgets thing? Again, HTMLWidgets is something from the R world, I don't really know much about it.

mingwandroid commented 7 years ago

Luckily this stuff worked just fine for @msarahan so we were able to compare working with non-working.

The most useful thing we discovered after that is options(jupyter.log_level=10), setting this caused the macOS Terminal to output, for me:

DEBUG: Sending msg execute_input
DEBUG: Executing code: library(dplyr)
library(rbokeh)
library(shiny)

z <- lm(dist ~ speed, data = cars)

p <- figure(width = 600, height = 600) %>%
  ly_points(cars, hover = cars) %>%
  ly_lines(lowess(cars), legend = "lowess") %>%
  ly_abline(z, type = 2, legend = "lm")
p

DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: ERROR while rich displaying an object: Error in htmlwidgets::saveWidget(obj, htmlfile): Saving a widget with selfcontained = TRUE requires pandoc. For details see:
https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md

Traceback:
1. lapply(X = X, FUN = FUN, ...)
2. FUN(X[[i]], ...)
3. tryCatch(withCallingHandlers({
 .     rpr <- mime2repr[[mime]](obj)
 .     if (is.null(rpr)) 
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler), error = outer_handler)
4. tryCatchList(expr, classes, parentenv, handlers)
5. tryCatchOne(expr, names, parentenv, handlers[[1L]])
6. doTryCatch(return(expr), name, parentenv, handler)
7. withCallingHandlers({
 .     rpr <- mime2repr[[mime]](obj)
 .     if (is.null(rpr)) 
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler)
8. mime2repr[[mime]](obj)
9. repr_html.htmlwidget(obj)
10. htmlwidgets::saveWidget(obj, htmlfile)
11. stop("Saving a widget with selfcontained = TRUE requires pandoc. For details see:\n", 
  .     "https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md")

DEBUG: Sending display_data: List of 1
 $ text/plain: chr "HTML widgets cannot be represented in plain text (need html)"
DEBUG: Sending msg display_data
DEBUG: Sending msg execute_reply
DEBUG: Sending msg status
DEBUG: main loop: beginning

@ijstokes for now, brew install pandoc. Tomorrow I will look into adding a package (RStudio has an embedded pandoc so I'll probably split that one off into its own package). We should leave this issue open until I get this done.

ijstokes commented 7 years ago

Conda-Forge and the anaconda-nb-extension channels have pandoc packaged and available. I tried using the 1.12 pandoc version available in anaconda-nb-extensions and this had the effect of no longer putting the "HTML widgets ..." error message inside the Jupyter Notebook, but neither did it produce an rbokeh plot. I used the options(...) technique and then saw that the "HTML widgets ...." error simply moved to debug output in the Jupyter server console. I removed that conda package and then tried brew install pandoc (1.19.2.1), then restarted the Jupyter server, but got the same result as conda: the error message no longer appeared in the Notebook, but with the debug logging jacked up It showed up in the console log output:

DEBUG: Executing code: z <- lm(dist ~ speed, data = cars)

p <- figure(width = 600, height = 600) %>%
  ly_points(cars, hover = cars) %>%
  ly_lines(lowess(cars), legend = "lowess") %>%
  ly_abline(z, type = 2, legend = "lm")
p
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Sending display_data: List of 2
 $ text/html : chr "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\" />\n<script src=\"data:application/x-javascript;base64,KGZ1bmN0aW9uKCk"| __truncated__
 $ text/plain: chr "HTML widgets cannot be represented in plain text (need html)"
DEBUG: Sending msg display_data
msarahan commented 7 years ago

That HTML widgets message will always be there. Basically, Jupyter is requesting these forms of data from all inputs:

getOption("jupyter.display_mimetypes")

which for me is:

'text/plain' 'text/html' 'text/markdown' 'text/latex' 'application/json' 'application/javascript' 'application/pdf' 'image/png' 'image/jpeg' 'image/svg+xml'

The fact that you are now getting the html response is promising - that was the main bug. Now I think it's a Jupyter setting issue. What does this show for you?

getOption("jupyter.rich_display")

It's TRUE for me.

mingwandroid commented 7 years ago

@ijstokes can you list your packages after you introduced conda-forge to the mix. I would recommend preferring Homebrew for now I'm afraid.

Also, you may as well go ahead and create a new clean env to test this on.

mingwandroid commented 7 years ago

@ijstokes, where are we with this? For me, uninstalling homebrew's pandoc and using the pandoc binary that's part of our RStudio package also works:

From Terminal, in an activated env with rstudio (which bundles its own pandoc) installed, launch jupyter as follows:

brew remove pandoc
conda install -c r rstudio
PATH=$CONDA_PREFIX/bin/pandoc:$PATH jupyter notebook

then in the notebook:

options(jupyter.log_level=10)
library(dplyr)
library(rbokeh)

z <- lm(dist ~ speed, data = cars)

p <- figure(width = 600, height = 600) %>%
  ly_points(cars, hover = cars) %>%
  ly_lines(lowess(cars), legend = "lowess") %>%
  ly_abline(z, type = 2, legend = "lm")
p

.. If this fails please copy the output from Terminal.

mingwandroid commented 7 years ago

Also try to disable ad blockers if you have them running.

mingwandroid commented 7 years ago

@ijstokes, I released updated pandoc builds to defaults, can you try again with conda install pandoc please?

ijstokes commented 7 years ago

I've done brew remove pandoc and re-created a fresh conda environment, but still no luck. No output. Attached is my Conda environment.

dspyr.txt

For @msarahan I get TRUE to the getOption("jupyter.rich_display") operation.

Here is the debug output that I get:

DEBUG: main loop: beginning
DEBUG: main loop: after poll
DEBUG: main loop: shell
DEBUG: Sending msg status
DEBUG: Sending msg execute_input
DEBUG: Executing code: z <- lm(dist ~ speed, data = cars)

p <- figure(width = 600, height = 600) %>%
  ly_points(cars, hover = cars) %>%
  ly_lines(lowess(cars), legend = "lowess") %>%
  ly_abline(z, type = 2, legend = "lm")
p
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Sending display_data: List of 2
 $ text/html : chr "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\" />\n<script src=\"data:application/x-javascript;base64,KGZ1bmN0aW9uKCk"| __truncated__
 $ text/plain: chr "HTML widgets cannot be represented in plain text (need html)"
DEBUG: Sending msg display_data
DEBUG: Sending msg execute_reply
DEBUG: Sending msg status
DEBUG: main loop: beginning
ijstokes commented 7 years ago

I was pulling packages from the r channel in my last comment. I'm starting over and just pulling content from defaults, but I might run out of time to test this so I just wanted to provide that clarification.

ijstokes commented 7 years ago

Unfortunately the same lack of rbokeh output after reverting to a defaults-only package source. Updated environment:

dspyr.txt

$ which pandoc
/Users/ijstokes/anaconda/envs/dspyr/bin/pandoc

Not sure what steps to try next. @mingwandroid do you have a minimal Jupyter Notebook and a conda environment specification that I could try out?

mingwandroid commented 7 years ago

r vs defaults shouldn't matter (except during the < 24 hour periods where I've uploaded to anaconda.org/r and they've not been synced to repo.continuum.io yet).

mingwandroid commented 7 years ago

Did you check for any ad-blocking? What browser are you using?

mingwandroid commented 7 years ago

PATH=$CONDA_PREFIX/bin/pandoc:$PATH is no longer necessary since pandoc is no longer in its own folder (though it shouldn't be harmful either)

mingwandroid commented 7 years ago

Here's a full rundown of what just worked for me:

Installation:

pushd /tmp
curl -SLO https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash ./Miniconda3-latest-MacOSX-x86_64.sh -b -p /tmp/jupyter
source /tmp/jupyter/bin/activate
conda create -n dspyr r-essentials=1.5.2 -y
source activate dspyr
jupyter notebook

In the Jupyter R notebook:

options(jupyter.log_level=10)
library(dplyr)
library(rbokeh)
z <- lm(dist ~ speed, data = cars)
p <- figure(width = 600, height = 600) %>%
  ly_points(cars, hover = cars) %>%
  ly_lines(lowess(cars), legend = "lowess") %>%
  ly_abline(z, type = 2, legend = "lm")
p

Output written to the console:

[W 13:53:17.407 NotebookApp] Widgets are unavailable. Please install widgetsnbextension or ipywidgets 4.0
[I 13:53:17.424 NotebookApp] Serving notebooks from local directory: /private/tmp
[I 13:53:17.424 NotebookApp] 0 active kernels 
[I 13:53:17.424 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=f377660e44d1610cadac9c2d9b132787d5cc043c142f02a1
[I 13:53:17.424 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 13:53:17.427 NotebookApp] 

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=f377660e44d1610cadac9c2d9b132787d5cc043c142f02a1
[I 13:53:18.086 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 13:53:22.777 NotebookApp] Creating new notebook in 
[I 13:53:23.516 NotebookApp] Kernel started: c64fb7fe-36af-4ebe-85c0-d69cc62a18af
[W 13:53:23.532 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20170216135317 (::1) 8.59ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=ir
DEBUG: Value output...
DEBUG: Message output: packageStartupMessage in packageStartupMessage(gettextf("\nAttaching package: %s\n", sQuote(package)), : 
Attaching package: ‘dplyr’

DEBUG: Stream output: 
Attaching package: ‘dplyr’

DEBUG: Sending msg stream
DEBUG: Message output: packageStartupMessage in packageStartupMessage(msg, domain = NA): The following objects are masked from ‘package:stats’:

    filter, lag

DEBUG: Stream output: The following objects are masked from ‘package:stats’:

    filter, lag

DEBUG: Sending msg stream
DEBUG: Message output: packageStartupMessage in packageStartupMessage(msg, domain = NA): The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

DEBUG: Stream output: The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

DEBUG: Sending msg stream
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Value output...
DEBUG: Sending display_data: List of 2
 $ text/html : chr "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\" />\n<script src=\"data:application/x-javascript;base64,KGZ1bmN0aW9uKCk"| __truncated__
 $ text/plain: chr "HTML widgets cannot be represented in plain text (need html)"
DEBUG: Sending msg display_data
DEBUG: Sending msg execute_reply
DEBUG: Sending msg status
DEBUG: main loop: beginning
[W 13:53:52.007 NotebookApp] 403 POST /jsnlog.logger (::1): '_xsrf' argument missing from POST
[W 13:53:52.008 NotebookApp] 403 POST /jsnlog.logger (::1) 1.72ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=ir
[I 13:54:10.350 NotebookApp] Saving file at /Untitled.ipynb

While the jupyter notebook and R kernel are running, from another Terminal window, use this to list the shared libraries that R has loaded and their md5 checksums:

lsof -p $(ps aux | grep "exec/R" | sort | head -1 | tr -s " " | cut -f2 -d' ') | grep "\.so\|.dylib" | tr -s " " | cut -f9 -d' ' | sort | xargs md5

For me:

MD5 (/private/tmp/jupyter/envs/dspyr/lib/libgfortran.3.dylib) = 24ef24669e10025ec0575d7d2b7f9b91
MD5 (/private/tmp/jupyter/envs/dspyr/lib/libiconv.2.dylib) = 876e5ca126d78f8f70d66aa59553068d
MD5 (/private/tmp/jupyter/envs/dspyr/lib/libicui18n.54.1.dylib) = e581f6eaa56d5cc5a73871954fa27858
MD5 (/private/tmp/jupyter/envs/dspyr/lib/libicuuc.54.1.dylib) = 38a514e9bbb2c69fbe7ac0f050c62aa9
MD5 (/private/tmp/jupyter/envs/dspyr/lib/libintl.9.dylib) = 9efd5b78a5bbbd12226ab8c5ec7e1621
MD5 (/private/tmp/jupyter/envs/dspyr/lib/libquadmath.0.dylib) = c7ca60c64ec4f7e6031e08df717e9a75
MD5 (/private/tmp/jupyter/envs/dspyr/lib/libstdc++.6.dylib) = 18a3affdc57f95c1f06b0ab31278f5ca
MD5 (/private/tmp/jupyter/pkgs/icu-54.1-0/lib/libicudata.54.1.dylib) = d159af09c65333f9bbb424a0eee4078d
MD5 (/private/tmp/jupyter/pkgs/libgcc-4.8.5-1/lib/libgcc_s.1.dylib) = b046bd07a9730dc2cc56e289530f98bc
MD5 (/private/tmp/jupyter/pkgs/pcre-8.39-1/lib/libpcre.1.dylib) = ecfe2aef1bd19212b429444d66974689
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/lib/libR.dylib) = 8ce46eed21723109e0995261078caf2b
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/library/grDevices/libs/grDevices.so) = 7ffb65a84922076bf9f9703927069d06
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/library/graphics/libs/graphics.so) = 36331432dd74e886e8aef01549318fdf
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/library/grid/libs/grid.so) = 11de18e98c5b0327880d06fdf50e3262
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/library/methods/libs/methods.so) = bce1dd21f4f13012d25aa1531ff60cbf
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/library/stats/libs/stats.so) = 58dedf3c5ee743de351c171a643c601b
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/library/tools/libs/tools.so) = fc3cf7e368f4b233cc69ac3b540981d5
MD5 (/private/tmp/jupyter/pkgs/r-base-3.3.2-1/lib/R/library/utils/libs/utils.so) = d7cb98b69b34b681e604cf90041afad0
MD5 (/private/tmp/jupyter/pkgs/r-colorspace-1.3_1-r3.3.2_0/lib/R/library/colorspace/libs/colorspace.so) = 4563da71ed233de27b9e21fc899c0b46
MD5 (/private/tmp/jupyter/pkgs/r-digest-0.6.10-r3.3.2_0/lib/R/library/digest/libs/digest.so) = 0e4f7abe6cdb331c446e1a939808d55b
MD5 (/private/tmp/jupyter/pkgs/r-dplyr-0.5.0-r3.3.2_0/lib/R/library/dplyr/libs/dplyr.so) = b5dc76ed53bf2edacc34b39f4edccbbe
MD5 (/private/tmp/jupyter/pkgs/r-hexbin-1.27.1-r3.3.2_0/lib/R/library/hexbin/libs/hexbin.so) = 9f6554c2e50b81266928953ebeb70ab7
MD5 (/private/tmp/jupyter/pkgs/r-htmltools-0.3.5-r3.3.2_0/lib/R/library/htmltools/libs/htmltools.so) = 474984941ea1d1d1fc40e2aaa2f26f7f
MD5 (/private/tmp/jupyter/pkgs/r-jsonlite-1.1-r3.3.2_0/lib/R/library/jsonlite/libs/jsonlite.so) = cedf912a8744ed8350dd1b7de219101e
MD5 (/private/tmp/jupyter/pkgs/r-lattice-0.20_34-r3.3.2_0/lib/R/library/lattice/libs/lattice.so) = cb72876dac6edc330e0d2de9daa7e3fe
MD5 (/private/tmp/jupyter/pkgs/r-lazyeval-0.2.0-r3.3.2_0/lib/R/library/lazyeval/libs/lazyeval.so) = b107ff96a11a867e0ff2368e9e061d9d
MD5 (/private/tmp/jupyter/pkgs/r-maps-3.1.1-r3.3.2_0/lib/R/library/maps/libs/maps.so) = 162883974c1fb07f21bc892d283fe6c1
MD5 (/private/tmp/jupyter/pkgs/r-pbdzmq-0.2_4-r3.3.2_0/lib/R/library/pbdZMQ/libs/pbdZMQ.so) = 01017fbde6945d925e51ffb52f4fde99
MD5 (/private/tmp/jupyter/pkgs/r-plyr-1.8.4-r3.3.2_0/lib/R/library/plyr/libs/plyr.so) = 1f7aa928ec398d59fe286cfc801bf425
MD5 (/private/tmp/jupyter/pkgs/r-pryr-0.1.2-r3.3.2_0/lib/R/library/pryr/libs/pryr.so) = ffd1b91b7ef5cf9df274e090c38d57e3
MD5 (/private/tmp/jupyter/pkgs/r-rcpp-0.12.8-r3.3.2_0/lib/R/library/Rcpp/libs/Rcpp.so) = 97519c675246d521c9ae89c86d1dd4c0
MD5 (/private/tmp/jupyter/pkgs/r-scales-0.4.1-r3.3.2_0/lib/R/library/scales/libs/scales.so) = 6379990a2a31c0b0706a53b884ba7da8
MD5 (/private/tmp/jupyter/pkgs/r-stringi-1.1.2-r3.3.2_0/lib/R/library/stringi/libs/stringi.so) = 8a8de9d4269d8c4fed23bdaabd2ec74e
MD5 (/private/tmp/jupyter/pkgs/r-tibble-1.2-r3.3.2_0/lib/R/library/tibble/libs/tibble.so) = 30d7575eb80fd878bd7125be7130426d
MD5 (/private/tmp/jupyter/pkgs/r-uuid-0.1_2-r3.3.2_0/lib/R/library/uuid/libs/uuid.so) = 63e3310c6abfd83a20c0cd07951ff6bd
MD5 (/private/tmp/jupyter/pkgs/r-yaml-2.1.14-r3.3.2_0/lib/R/library/yaml/libs/yaml.so) = 252a84f70c6bef9b38f8b4b6699bce88
MD5 (/private/tmp/jupyter/pkgs/readline-6.2-2/lib/libreadline.6.2.dylib) = dcfc8bb9b615176679aa9097f5b8acb5
MD5 (/private/tmp/jupyter/pkgs/xz-5.2.2-1/lib/liblzma.5.dylib) = bcac4111a08ef28530c77660640ed2d9
MD5 (/private/tmp/jupyter/pkgs/zeromq-4.1.3-0/lib/libzmq.5.dylib) = 1c00c63f6ac2402ae4722e44c07db6cf
MD5 (/private/tmp/jupyter/pkgs/zlib-1.2.8-3/lib/libz.1.2.8.dylib) = e933057789e60406502f57c28ba7dcb8
MD5 (/usr/lib/libSystem.B.dylib) = 3e302c3d7a55d68f3d563af09096808e
MD5 (/usr/lib/system/libdyld.dylib) = f6098ab2aef1adebce43c6a4236b3699
MD5 (/usr/lib/system/libkxld.dylib) = be8dc101791da5da7204099fce61e330
MD5 (/usr/lib/system/libsystem_coretls.dylib) = c764f398a33330c9721185d6fefcc69f
MD5 (/usr/lib/system/libsystem_kernel.dylib) = 346c3820cf02cc12a7e56af07bc1e153
MD5 (/usr/lib/system/libsystem_networkextension.dylib) = 50360bb91fc7f160e2f07423d4a0ae77
MD5 (/usr/lib/system/libsystem_sandbox.dylib) = 05cddf1d2988e1366263f0080accde44
MD5 (/usr/lib/system/libsystem_symptoms.dylib) = 6ccbcfaf77560186e636561e795e7dde
MD5 (/usr/lib/system/libsystem_trace.dylib) = de9ddda018993f0d4a1031bfc93b47b8

Close jupyter (browser and command-line) and clean-up:

source deactivate
rm -Rf /tmp/{Miniconda3-latest-MacOSX-x86_64.sh,jupyter}
popd
ijstokes commented 7 years ago

Ad-blocking was a good thought, and I would have screamed if that had been the cause. But no dice. Adblocking plugin is universally disabled.

I'm trying the mini-conda test sequence you documented above...

Kernel death.

screenshot 2017-02-16 14 30 04

Looks like a problem with libintl.9.dylib (console trace below)

$ jupyter notebook
[W 14:29:30.216 NotebookApp] Widgets are unavailable. Please install widgetsnbextension or ipywidgets 4.0
[I 14:29:30.223 NotebookApp] The port 8888 is already in use, trying another port.
[I 14:29:30.254 NotebookApp] Serving notebooks from local directory: /private/tmp
[I 14:29:30.255 NotebookApp] 0 active kernels 
[I 14:29:30.255 NotebookApp] The Jupyter Notebook is running at: http://localhost:8889/?token=614a1264d48fd1c3dafe3eff4308a3f255e02f7aefb13acf
[I 14:29:30.255 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:29:30.256 NotebookApp] 

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8889/?token=614a1264d48fd1c3dafe3eff4308a3f255e02f7aefb13acf
[I 14:29:30.761 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 14:29:40.622 NotebookApp] Creating new notebook in 
[W 14:29:41.266 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20170216142929 (::1) 6.00ms referer=http://localhost:8889/notebooks/Untitled.ipynb?kernel_name=ir
[I 14:29:41.434 NotebookApp] Kernel started: 419e51c8-76f3-407f-8a23-8c18210eac46
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so':
  dlopen(/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so, 6): Library not loaded: @rpath/libintl.9.dylib
  Referenced from: /private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so
  Reason: image not found
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
[I 14:29:44.436 NotebookApp] KernelRestarter: restarting kernel (1/5)
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so':
  dlopen(/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so, 6): Library not loaded: @rpath/libintl.9.dylib
  Referenced from: /private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so
  Reason: image not found
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
[I 14:29:47.449 NotebookApp] KernelRestarter: restarting kernel (2/5)
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so':
  dlopen(/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so, 6): Library not loaded: @rpath/libintl.9.dylib
  Referenced from: /private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so
  Reason: image not found
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
[I 14:29:50.465 NotebookApp] KernelRestarter: restarting kernel (3/5)
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so':
  dlopen(/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so, 6): Library not loaded: @rpath/libintl.9.dylib
  Referenced from: /private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so
  Reason: image not found
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
[W 14:29:51.472 NotebookApp] Timeout waiting for kernel_info reply from 419e51c8-76f3-407f-8a23-8c18210eac46
[I 14:29:53.478 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 419e51c8-76f3-407f-8a23-8c18210eac46 restarted
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so':
  dlopen(/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so, 6): Library not loaded: @rpath/libintl.9.dylib
  Referenced from: /private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so
  Reason: image not found
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
[W 14:29:56.491 NotebookApp] KernelRestarter: restart failed
[W 14:29:56.491 NotebookApp] Kernel 419e51c8-76f3-407f-8a23-8c18210eac46 died, removing from map.
ERROR:root:kernel 419e51c8-76f3-407f-8a23-8c18210eac46 restarted failed!
[W 14:29:56.518 NotebookApp] Kernel deleted before session
ijstokes commented 7 years ago

I don't know how to read otool output, but in case it is helpful:

$ otool -L /private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so
/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so:
    @rpath/R/library/digest/libs/digest.so (compatibility version 0.0.0, current version 0.0.0)
    @rpath/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    @rpath/R/lib/libR.dylib (compatibility version 3.3.0, current version 3.3.2)
    @rpath/libintl.9.dylib (compatibility version 11.0.0, current version 11.4.0)
    @rpath/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.21.0)
ijstokes commented 7 years ago

This seems like progress! LMK what I can do next to test this further.

mingwandroid commented 7 years ago

For me it's the same:

$ otool -L /private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so
/private/tmp/jupyter/envs/dspyr/lib/R/library/digest/libs/digest.so:
    @rpath/R/library/digest/libs/digest.so (compatibility version 0.0.0, current version 0.0.0)
    @rpath/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    @rpath/R/lib/libR.dylib (compatibility version 3.3.0, current version 3.3.2)
    @rpath/libintl.9.dylib (compatibility version 11.0.0, current version 11.4.0)
    @rpath/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.21.0)