0

I just got done writing a pretty good rock paper scissors game and now when I try to import it and run the cell I'm getting this:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-7-8d3be5084430> in <module>
----> 1 import RPSgame.py

ModuleNotFoundError: No module named 'RPSgame.py'; 'RPSgame' is not a package

What is causing this and how can I fix it? I'm running Jupyter Notebook through Anaconda Navigator

2 Answers2

0

It might be related to how you are importing the .py file This link might help: How to import other Python files?

Data Monger
  • 106
  • 10
0

You shall try this:

import .RPSgame
Divyessh
  • 2,540
  • 1
  • 7
  • 24