My environment is windows 10 + pycharm + Python 3.7. I am trying to use igraph by studying https://igraph.org/python/doc/tutorial/tutorial.html. It can be installed successfully. But, when I run
from igraph import *
I have got such information:
Traceback (most recent call last):
File "C:\feng\myCode\infoExtract\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3319, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-50-283d00fb94b6>", line 1, in <module>
from igraph import *
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\feng\myCode\infoExtract\venv\lib\site-packages\igraph\__init__.py", line 8, in <module>
raise DeprecationWarning("To avoid name collision with the igraph project, "
DeprecationWarning: To avoid name collision with the igraph project, this visualization library has been renamed to 'jgraph'. Please upgrade when convenient.
when I try
g = Graph()
I have got an error:
Traceback (most recent call last):
File "C:\feng\myCode\infoExtract\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3319, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-51-abc271209dcf>", line 1, in <module>
g = Graph()
NameError: name 'Graph' is not defined
I have checked the answer from Error with igraph library - deprecated library. Then install python-igraph according to https://pypi.org/project/python-igraph/. But I have got this:
At the same time, I have also uninstalled igraph:
You can see that igraph can be uploaded. But Graph function still does not work. Why is this happening?