BokehJS library missing error and no plot - bokeh

I am running Anaconda 10.0 Jupyter Notebook Python 3.8, bokeh 2.3.0 on Chrome. On my other PC (should be identical setup, except this is a slightly later Anaconda version) images are fine, but on this there is no image and the Javascript console tells me:
Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing
I could not find a simple, working solution to this problem here or elsewhere on the net and I am at a total loss now.
The abbreviated code I'm running is:
import regex as rg
import pandas as pd
import numpy as np
import datashader as ds, colorcet
import holoviews as hv
from holoviews.operation.datashader import datashade
from holoviews import opts
hv.extension("bokeh")
datashade(hv.Points(df_re), cmap=colorcet.fire).relabel('Reflectances').opts(height=700, width=800)
Where is the problem and how should I fix it?

Unfortunately that didn't work for me, still the same error.
What I found interesting was that prior to installing ver. 1.0.3 of the extension, Anaconda prompt said:
(Datashader-Holoview) C:\Windows\system32>jupyter labextension list
JupyterLab v2.2.6
No installed extensions
It is as if no version of that extension did exist in the environment.

There might be a bug with the most recent pyviz jupyter labextension (1.0.4). See if it works for you after you do
jupyter labextension install #pyviz/jupyterlab_pyviz#1.0.3
This worked for me.

Related

Unable to import fiftyone in sagemaker jupyter notebook

I am using python version 3.7.12 in sagemaker jupyter notebook.
I could do a !pip install fiftyone in the notebook but when I am trying to import fiftyone as fo it is giving me below error:
ConnectionError: Could not connect to 'mongod'
I have gone through its github repository but couldn't find a way to resolve this issue. And I tried implementing some of the answers provided for fiftyone's installation in Linux but it didn't work either.

from pandas_profiling import profilereport Error

I've installed the pandas_profiling package but, the system is not recognizing the package.
I'm using VS Code for the project.
Hi, I'm trying to install pandas profiling for an ML testing project I've checked multiple Question Related to it on StackOverFlow but could not find any match Or Solution.
I've checked the package and it got successfully installed on the system.
But I'm still getting the Error
FYI:
I've installed multiple packages required for the project, such as NumPy, pandas, etc., and did not face any problems.
Note: If any other info is required let me Know.
import sys
!{sys.executable} -m pip install pandas-profiling
Add the above line to the top of your file

Error installing Numpy with Reticulate from Rstudio

I am trying to use Python from Rstudio but even if pandas and other packages can get installed normally , numpy don't. Is it something wrong with my code ?
PS : I am learning python so I might do basic error
I have tried to install again numpy from conda and no problem on there

can't import 'torchtext' module in jupyter notebook while using pytorch

I installed pytorch using anaconda3 and my created virtual conda environment named 'torchTest'.
I installed all the modules needed but, codes doesn't work in jupyter python.
I installed torchtext using
1.pip install https://github.com/pytorch/text/archive/master.zip
2.and also pip install torchtext too.
all I mentioned successfully downloaded in my MAC OS X, but can't get what's wrong with my Jupyter notebook..
After having the same issue with torchtext from within my jupyterlab, I opened an issue on Github at the jupyterlab project as well as at the torchtext repository.
My current solution is to add the PYTHONPATH from the Anaconda env.
The Anaconda path is usually like that $HOME/anaconda/bin
You can add it from within Jupyter Lab/Notebook like that:
import sys
sys.path.append("/some/path/to/add")
import torchtext

rpy2 import works in shell but not in jupyter notebook

So, I have installed rpy2 successfully, and I can import it in a python shell, for example. Also, I have Jupyter notebook successfully installed. But for some reason I cannot import rpy2 on the jupyter notebook. I get the standard 'module not found' error. Other posts have addressed problems relating to installation of rpy2 itself, but specifically, I can't import ONLY from jupyter notebook. I find it quite strange, because I'm fairly certain I only have one copy of Python 3.6, so why can it import in the terminal but not in the notebook. .. .
I solved this by re-installing jupyter notebook. . .
I encountered the same issue, and I use many different env with conda. Here is my solution, starting your jupyter notebook with the same env which rpy2 is installed.

Resources