Arithmetic Formatter

Hi everyone. I’m trying to solve the Arithmetic Formatter challenge but I can’t run my code and I got this error: “Traceback (most recent call last):
File “/home/runner/boilerplate-arithmetic-formatter-1/main.py”, line 2, in
from pytest import main
ModuleNotFoundError: No module named ‘pytest’”
Does someone know what I did wrong?

my code

the challenge:
https://www.freecodecamp.org/learn/scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter

1 Like

Hey @eudesbarrigah I just forked it and tried it myself. It’s nothing you did wrong, so I’m not sure how it happened but I fixed it. Go into “modules” in replit, it did say pytest was installed but clearly it wasn’t working. I just removed the pytest module and reinstalled it by searching for it in the modules. Hopefully this works for you too!

Hi Fox … I’m having this exact same issue. Tried to follow your directions by going to modules but I cannot find it. Any help or suggestions would be greatly appreciated.

Here’s my replit …

Hi @MauMau4 I have created a little screenshot guide for you, It’s my bad, you should go to the ‘packages’ section to find modules.




Hope this solves your problem! Have fun with the challenge.

2 Likes

Thank you … also found another way to do it …
from the Shell you can run “pip install pytest” and that worked.

Yeah, that’s basically what you’re doing in the package menu, it’s just easier for those who don’t know the shell commands.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.