I imported the starter code from github and my code only runs tests when I type in pytest into the console, whenever I click the run button I get a modulenotfound error for pytest even though I’ve searched the web on how to install it onto replit. There’s also no packager icon on the left side either. How do I get pytest onto replit so the run button works?
Looks like something changed recently in the replit dependency handling.
replit.nix file (it’s hidden, you will need to click three dots at the right of the Files tab and click Show hidden files) add
pkgs.python38Packages.pytest under the
deps, it should look something like:
deps = [ pkgs.python38Full pkgs.python38Packages.pytest ];
here is my code
Have you tried editing
replit.nix file as described above?
Line with module needs to be added into the
deps that are defined on line
hey!!!.,thanks it worked
Thank you so much. It worked!
This solution did not work for me. Any other suggestions??
@molly_tov88 please create new thread, it will be more convenient for all involved parties. Include in the post which project is causing troubles, what exactly is the issue (error), etc.
It was the .replit file for me. Extra sentiment was added when importing from github. after comparing the files, I deleted everything and pasted the lines below into the .replit file
language = "python3" run = "python main.py"
(post deleted by author)
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.