Arithmetic Formatter - No module named pytest

Tell us what’s happening:
replit is giving me the ‘No module named pytest’ error; I have tried fixes posted in other threads, and I have tried adapting for both 3.8 and the 3.10 (which appears to be what the replit.nix file defaults to now)

Your code so far
This is my current replit.nix

{ pkgs }: {
  deps = [
  env = {
    PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
      # Needed for pandas / numpy
      # Needed for pygame
      # Needed for matplotlib
    PYTHONHOME = "${pkgs.python310Full}";
    PYTHONBIN = "${pkgs.python310Full}/bin/python3.10";
    LANG = "en_US.UTF-8";
    STDERREDBIN = "${pkgs.replitPackages.stderred}/bin/stderred";
    PRYBAR_PYTHON_BIN = "${pkgs.replitPackages.prybar-python310}/bin/prybar-python310";

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Challenge: Scientific Computing with Python Projects - Arithmetic Formatter

Link to the challenge:

The boilerplate repo does replicate this problem. The pyproject.toml shows pytest installed but there’s no poetry.lock and nothing is really installed.

Reinstalling (remove and install again) pytest on the boilerplate repo resolves the problem.

What is the most accessible means of doing so, would you advise?

Have you tried just installing it from the console?

like: pip install pytest ?

1 Like

Start by using the replit package tool. More discussion can be found by looking at all the posts about dependency problems with the python data analysis projects in the forums.

Tried this; seems successful, as it moves past the package imports. Now I can work on the project.

Thank you.

1 Like

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