DeepWalk Installation

Recently I want to install DeepWalk on my Mac, I follow the Installation but when I want to run the Example I encounter the error as below:

Traceback (most recent call last):
File “/Users/tsengkaisheng/anaconda3/bin/deepwalk”, line 11, in <module>
load_entry_point(‘deepwalk==1.0.1’, ‘console_scripts’, ‘deepwalk’)()
File “/Users/tsengkaisheng/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py”, line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/Users/tsengkaisheng/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py”, line 2649, in load_entry_point
return ep.load()
File “/Users/tsengkaisheng/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py”, line 2303, in load
return self.resolve()
File “/Users/tsengkaisheng/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py”, line 2309, in resolve
module = __import__(self.module_name, fromlist=[‘__name__’], level=0)
File “/Users/tsengkaisheng/anaconda3/lib/python3.6/site-packages/deepwalk-1.0.1-py3.6.egg/deepwalk/__main__.py”, line 16, in <module> from skipgram import Skipgram
ModuleNotFoundError: No module named ‘skipgram’

The error message is No module named ‘skipgram’.

The solution is to find the __main__.py in deepwalk folder (the path of __main__.py is in your error message), go to line 16, edit the following code

from skipgram import Skipgram

to

from deepwalk.skipgram import Skipgram

Problem solved!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade