ucsd-ccbb / visJS2jupyter

visJS2jupyter is a tool to bring the interactivity of networks created with vis.js into jupyter notebook cells
MIT License
78 stars 17 forks source link

Issues reproducing demo notebooks #2

Closed smartinsightsfromdata closed 7 years ago

smartinsightsfromdata commented 7 years ago

I'm a bit confused: I've installed the latest version of visJS2jupyter and tried to reproduce some of the notebooks linked to the README, but I basically failed with all of them.

(Please note that I use python 3)

As an example, I tried to reproduce the heat propagation notebook:

#first cell in the notebook:
import matplotlib.pyplot as plt
import matplotlib as mpl
import networkx as nx
import visJS2jupyter.visualizations as visualizations

And I get:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-2fc2f7659132> in <module>()
      2 import matplotlib as mpl
      3 import networkx as nx
----> 4 import visJS2jupyter.visualizations as visualizations

/Users/e/anaconda3/lib/python3.5/site-packages/visJS2jupyter/visualizations.py in <module>()
     17 import pandas as pd
     18 from py2cytoscape import util
---> 19 import visJS_module as visJS_module
     20 
     21 def draw_graph_overlap(G1, G2,

ImportError: No module named 'visJS_module'

I could report also the others, but I get similar sort of errors in all of them. What do I do wrong?

julialen commented 7 years ago

I'm not seeing any obvious errors. Could you check that visJS_module is in the visJS2jupyter directory?

cd /Users/e/anaconda3/lib/python3.5/site-packages/visJS2jupyter/
ls

Out of curiosity, how did you install visJS2jupyter: pip or github?

smartinsightsfromdata commented 7 years ago

I used pip to install visJS2jupyter.

This is what I have in the directory:

$ls
__init__.py     __pycache__     visJS_module.py     visualizations.py
julialen commented 7 years ago

I think I might have found the bug. Try updating with pip and let me know if it works.

smartinsightsfromdata commented 7 years ago

Great! Now works. I'll try the other notebooks & report.

julialen commented 7 years ago

Great, I'm glad to hear it! Thank you for letting us know about the issue.