How to resolve the error, “module umap has no attribute UMAP”.. I tried installing & reinstalling umap but didn’t work to me

To use UMAP you need to install umap-learn not umap. So, in case you installed umap run the following commands to uninstall umap and install upam-learn instead: pip uninstall umap pip install umap-learn And then in your python code make sure you are importing the module using: import umap.umap_ as umap Instead of import umap

Using %matplotlib notebook after %matplotlib inline in Jupyter Notebook doesn’t work

You just have the wrong order of your commands. A backend should be set before importing pyplot in jupyter. Or in other words, after changing the backend, pyplot needs to be imported again. Therefore call %matplotlib … prior to importing pyplot. In first cell: %matplotlib inline import matplotlib.pyplot as plt plt.plot([1,1.6,3]) In second cell: %matplotlib …

Read more

Display SVG in IPython notebook from a function

You need to display the SVG like from IPython.display import SVG, display def show_svg(): display(SVG(url=”http://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg”)) You first example works as the SVG object returns itself an is subsequently displayed by the IPython display machinery. As you want to create your SVG object in a custom method, you need to take care of the displaying. The …

Read more

How can I display the version of my Jupyter notebook and run cells in Jupyter notebooks? I get an error: bad interpreter

From your terminal, you can simply do: jupyter –version Or, if you are using a notebook then do: !jupyter –version Here is the output in my case: jupyter core : 4.5.0 jupyter-notebook : 5.2.2 qtconsole : 4.5.2 ipython : 5.5.0 ipykernel : 4.10.1 jupyter client : 5.3.1 jupyter lab : not installed nbconvert : 5.5.0 …

Read more