Pip install pytest

 python3 main.py
Traceback (most recent call last):
File “/home/runner/boilerplate-arithmetic-formatter-2/main.py”, line 2, in
from pytest import main
ModuleNotFoundError: No module named ‘pytest’
exit status 1

I keep getting this prompt. I have no idea what’s going on. Any advice…

1 Like

Try

pip install pytest

and if that fails,

poetry install pytest
1 Like

write to shell:

pip install pytest
2 Likes

I am having the same issue but when I go to pip install pytest, I receive around 8 imagemagick options and none of them seem to work. When I try to poetry install pytest, the shell spits back “too many arguments”.

1 Like

https://replit.com/@RobertBlock/boilerplate-arithmetic-formatter-2

to use poetry, do poetry add pytest. poetry install just installs packages from the pyproject.toml file, a a way to distribute dependencies in published projects.

1 Like

I put in pip install pytest and it worked.

It was already installed so it suggested ‘pip update package’ which worked. I appreciate your quick response this morning! These Free Code Camp challenges all have comparable issues. Hopefully this will work on those too.

1 Like