ModuleNotFoundError for pycirclize

107 Views Asked by At

For generating circos plots, used the following command to install pycirclize

pip install pycirclize

command ran properly. But when tried executing

from pycirclize import Circos

error thrown. Error message

ModuleNotFoundError: No module named 'pycirclize

Please help how to resolve the error.

Tried re-intstalling pycirclize, but the error is still being flagged.

1

There are 1 best solutions below

0
Dev Bhuyan On

As mentioned by Tim Roberts, the most common and obvious cause for this is multiple installations of Python, and hence pip. If you're using Jupyter or IPython, you can check your python interpreter using

import sys
sys.executable

This should return a path. In my case: '/home/dev/anaconda3/bin/python'. This is the interpreter used by your notebook. (Your system might have a different python installed for other purposes). By default if you are using !pip from within your notebook, that would be the pip associated with your notebook's python interpreter. If you are using pip from the terminal (or any place other than the notebook), you might need to use

/whatever/sys/executable/returns/path -m pip install pycirclize

This ensures that you are installing packages using the notebook interpreter's associated pip.

PROCEED WITH CAUTION

You can also probe into the different python versions installed in your system. If you're confident that some other python exists which is not used by your system (probably from some earlier installation), you can safely uninstall it. Otherwise just use the above workaround.