Closed cccnrc closed 4 years ago
The first thing I would do is check what version of ipykernel
you have installed. There is a known bug in 4.5.1 where this can happen. If so, you need to upgrade. You can check the version by running:
pip freeze | grep ipykernel
If you're running a more recent version of ipykernel than that, the next thing I would check is to make sur eyou have the igv server extension installed. From the command line, try running: jupyter serverextension list
and see if igv
appears in the list.
If not, you can install it by running jupyter serverextension enable --py igv
. (You may also need to include --sys-prefix
, depending on how your environment is set up.)
Hi @tmtabor , thank for your rapid answer.
I got both dependencies right:
python3 -m pip freeze | grep ipykernel
ipykernel==5.3.4
jupyter serverextension list
config dir: /home/enrico/.jupyter
igv enabled
- Validating...
igv OK
jupyter_nbextensions_configurator enabled
- Validating...
jupyter_nbextensions_configurator 0.4.1 OK
What else can I do?
This is a more unusual error then, but we can try to narrow it down. From the notebook where you're experiencing the error, try running:
get_ipython().kernel.comm_manager.comms
This should return a dict object, which is a map of comms (channels of communication between the Jupyter frontend and backend). Ideally there should be one entry in the dict, which is the comm opened by the igv extension when you created the igv.Browser
instance.
If you get an error message about get_ipython().kernel
being None, then we know this is some deeper configuration issue with Jupyter. On the other hand, if this returns an empty dict (after making sure to run b = igv.Browser({"genome": "hg19"})
) then we know it's a problem with the igv extension initializing the comm.
I get:
>>> get_ipython().kernel.comm_manager.comms
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'get_ipython' is not defined
In Jupyter Notebook, get_ipython()
should automatically be in the global context once the IPython kernel has started. If not, something odd is going on. Are you using nteract or a non-default kernel like xeus?
I got it now, I was trying this on my local machine and not in Jupyter notebook. So sorry if I wasted your time!
I followed your installation instruction and everything worked well, but when I try:
I get:
Thank you in advance for any help!