palash1992 / GEM

BSD 3-Clause "New" or "Revised" License
1.27k stars 360 forks source link

node2vec error #20

Closed mitchell-joblin closed 6 years ago

mitchell-joblin commented 6 years ago

I get the following error when trying to execute node2vec.

Traceback (most recent call last): File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 78, in globals = run_file(file, None, None) File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 35, in run_file pydev_imports.execfile(file, globals, locals) # execute the script File "/usr/share/pycharm/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/mj/git/TIA_Portal_Graph_Analysis/graph_analysis/graph_analysis.py", line 59, in Y, t = embedding.learn_embedding(graph=g_netx, edge_f=None, is_weighted=False, no_python=True) File "/home/mj/.local/lib/python3.6/site-packages/gem-1.0.0-py3.6.egg/gem/embedding/node2vec.py", line 84, in learn_embedding raise Exception('./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission') Exception: ./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission

I looked in the installation package directory and I don't see the c_exe folder there. Should I need to manually copy it there?

Thanks

palash1992 commented 6 years ago

Yes, you need to put the executable in the c_exe directory as stated in the exception:

'Exception: ./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission'

On Thu, Dec 21, 2017 at 12:22 PM mitchell-joblin notifications@github.com wrote:

I get the following error when trying to execute node2vec.

Traceback (most recent call last): File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 78, in globals = run_file(file, None, None) File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 35, in run_file pydev_imports.execfile(file, globals, locals) # execute the script File "/usr/share/pycharm/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/mj/git/TIA_Portal_Graph_Analysis/graph_analysis/graph_analysis.py", line 59, in Y, t = embedding.learn_embedding(graph=g_netx, edge_f=None, is_weighted=False, no_python=True) File "/home/mj/.local/lib/python3.6/site-packages/gem-1.0.0-py3.6.egg/gem/embedding/node2vec.py", line 84, in learn_embedding raise Exception('./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission') Exception: ./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission

I looked in the installation package directory and I don't see the c_exe folder there. Should I need to manually copy it there?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_palash1992_GEM_issues_20&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=cenn7jHvauTrmq31C6n4XzUYoNd8ybcevcdxGYmyev8&s=niKx6pcpRhfiwz03WmPNoUE-kqU_ryLQyN8fsn5xh1g&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABH2RTu-2DA7GVhdLIPJ868IypxIm3a3xLks5tCr3ogaJpZM4RKTph&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=cenn7jHvauTrmq31C6n4XzUYoNd8ybcevcdxGYmyev8&s=XrNeg3imLIdk7ZJ2H75-o9EbXfdIqrOsogajcLGl_nk&e= .

-- Regards, Palash Goyal Research Assistant Department of Computer Science University of Southern California

mitchell-joblin commented 6 years ago

Thanks for the quick reply.

The node2vec executable is inside the c_exe directory in the path that I cloned you’re repository. When I perform the installation (e.g. sudo python3.6 setup.py install) this c_exe folder is never copied to the target library destination. Are you saying I still have to manually copy the executable to the python library destination?

Palash Goyal notifications@github.com schrieb am Do. 21. Dez. 2017 um 21:30:

Yes, you need to put the executable in the c_exe directory as stated in the exception:

'Exception: ./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission'

On Thu, Dec 21, 2017 at 12:22 PM mitchell-joblin <notifications@github.com

wrote:

I get the following error when trying to execute node2vec.

Traceback (most recent call last): File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 78, in globals = run_file(file, None, None) File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 35, in run_file pydev_imports.execfile(file, globals, locals) # execute the script File "/usr/share/pycharm/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File

"/home/mj/git/TIA_Portal_Graph_Analysis/graph_analysis/graph_analysis.py", line 59, in Y, t = embedding.learn_embedding(graph=g_netx, edge_f=None, is_weighted=False, no_python=True) File

"/home/mj/.local/lib/python3.6/site-packages/gem-1.0.0-py3.6.egg/gem/embedding/node2vec.py", line 84, in learn_embedding raise Exception('./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission') Exception: ./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission

I looked in the installation package directory and I don't see the c_exe folder there. Should I need to manually copy it there?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_palash1992_GEM_issues_20&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=cenn7jHvauTrmq31C6n4XzUYoNd8ybcevcdxGYmyev8&s=niKx6pcpRhfiwz03WmPNoUE-kqU_ryLQyN8fsn5xh1g&e= , or mute the thread < https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABH2RTu-2DA7GVhdLIPJ868IypxIm3a3xLks5tCr3ogaJpZM4RKTph&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=cenn7jHvauTrmq31C6n4XzUYoNd8ybcevcdxGYmyev8&s=XrNeg3imLIdk7ZJ2H75-o9EbXfdIqrOsogajcLGl_nk&e=

.

-- Regards, Palash Goyal Research Assistant Department of Computer Science University of Southern California

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/palash1992/GEM/issues/20#issuecomment-353450559, or mute the thread https://github.com/notifications/unsubscribe-auth/AClOHCvXdk6j7bg-lGsNLnjVBl0FqFWhks5tCr_tgaJpZM4RKTph .

palash1992 commented 6 years ago

The reason I have disabled copying the c_exe folder is that it is specific to a machine. I have uploaded compiled executables on my machine but they will most likely not work on yours. Thus you need to compile node2vec from the source of snap library and put the executable in c_exe folder. Also, please remember to grant it execution permission by running chmod +x ./node2vec in c_exe folder.

On Thu, Dec 21, 2017 at 12:38 PM mitchell-joblin notifications@github.com wrote:

Thanks for the quick reply.

The node2vec executable is inside the c_exe directory in the path that I cloned you’re repository. When I perform the installation (e.g. sudo python3.6 setup.py install) this c_exe folder is never copied to the target library destination. Are you saying I still have to manually copy the executable to the python library destination?

Palash Goyal notifications@github.com schrieb am Do. 21. Dez. 2017 um 21:30:

Yes, you need to put the executable in the c_exe directory as stated in the exception:

'Exception: ./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission'

On Thu, Dec 21, 2017 at 12:22 PM mitchell-joblin < notifications@github.com

wrote:

I get the following error when trying to execute node2vec.

Traceback (most recent call last): File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 78, in globals = run_file(file, None, None) File "/usr/share/pycharm/helpers/pydev/pydev_run_in_console.py", line 35, in run_file pydev_imports.execfile(file, globals, locals) # execute the script File "/usr/share/pycharm/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File

"/home/mj/git/TIA_Portal_Graph_Analysis/graph_analysis/graph_analysis.py",

line 59, in Y, t = embedding.learn_embedding(graph=g_netx, edge_f=None, is_weighted=False, no_python=True) File

"/home/mj/.local/lib/python3.6/site-packages/gem-1.0.0-py3.6.egg/gem/embedding/node2vec.py",

line 84, in learn_embedding raise Exception('./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission') Exception: ./node2vec not found. Please compile snap, place node2vec in the path and grant executable permission

I looked in the installation package directory and I don't see the c_exe folder there. Should I need to manually copy it there?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_palash1992_GEM_issues_20&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=cenn7jHvauTrmq31C6n4XzUYoNd8ybcevcdxGYmyev8&s=niKx6pcpRhfiwz03WmPNoUE-kqU_ryLQyN8fsn5xh1g&e=

, or mute the thread <

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABH2RTu-2DA7GVhdLIPJ868IypxIm3a3xLks5tCr3ogaJpZM4RKTph&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=cenn7jHvauTrmq31C6n4XzUYoNd8ybcevcdxGYmyev8&s=XrNeg3imLIdk7ZJ2H75-o9EbXfdIqrOsogajcLGl_nk&e=

.

-- Regards, Palash Goyal Research Assistant Department of Computer Science University of Southern California

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/palash1992/GEM/issues/20#issuecomment-353450559, or mute the thread < https://github.com/notifications/unsubscribe-auth/AClOHCvXdk6j7bg-lGsNLnjVBl0FqFWhks5tCr_tgaJpZM4RKTph

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_palash1992_GEM_issues_20-23issuecomment-2D353452318&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=VuMtd246pn0mGXVKqC8sfLm5AnhyZwaT8LOjV61fl2g&s=RornmHR3iDKtcqR_qNMYa-KRnk44GVl3OTSnnfyIWOE&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABH2RdW6Lzo2uikJ2WP-5Fq7goRHkkOClKks5tCsHdgaJpZM4RKTph&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=I_A-ZJGnHcHAuxuBmINQ-Q&m=VuMtd246pn0mGXVKqC8sfLm5AnhyZwaT8LOjV61fl2g&s=c3acxRUPz36T4d91u6eLjF4pyk3c0e-2keceqXiqDqM&e= .

-- Regards, Palash Goyal Research Assistant Department of Computer Science University of Southern California

mitchell-joblin commented 6 years ago

Got it. Thanks!

susierao commented 6 years ago

Dear GEM developers,

I ran into the same problem and then I followed the instructions above.

The error persists. Is it because I am using virtualenv on my ubuntu server? Thank you very much. Susie

palash1992 commented 6 years ago

Hi Susie,

Are you able to call node2vec from command prompt? If not, make sure you can. It should work then.

Regards, Palash Goyal