0

I am trying to run a python script, which is a neural net model.

It runs when I'm trying to run it on command prompt like this below.

(torch) hkimlx@DESKTOP-62RHFK2:~/GDL/pytorch_geometric/examples$ python gcn.py

However, when I try to do it by copying the code onto Jupyter notebook, it gives me errors like this below.

usage: ipykernel_launcher.py [-h] [--use_gdc]
ipykernel_launcher.py: error: unrecognized arguments: -f /home/hkimlx/.local/share/jupyter/runtime/kernel-620f76cb-51fd-4133-8705-eba83e88ac4e.jso

Am I doing different things between when I run the original code (gcn.py) and the same code in the jupyter notebook with the same directory?

Thank you so much in advance!

mario119
  • 343
  • 3
  • 14

1 Answers1

1

I found the solution. The code included argparse.ArgumentParser that is not a good way for jupyter notebook to run a code.

How to fix ipykernel_launcher.py: error: unrecognized arguments in jupyter?

mario119
  • 343
  • 3
  • 14