Scientific Computing Arithmetic Formatter Project error: no module named pytest

This thread covers your problem (but with modules like numpy and pandas, instead of pytest). In your case, the key difference is that the line you need to add is pkgs.python38Packages.pytest. Once done, your replit.nix file should look like this:

{ pkgs }: {
  deps = [
    pkgs.python38Full
    pkgs.python38Packages.pytest
  ];
  env = {
    PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
      # Needed for pandas / numpy
      pkgs.stdenv.cc.cc.lib
      pkgs.zlib
      # Needed for pygame
      pkgs.glib
      # Needed for matplotlib
      pkgs.xorg.libX11
    ];
    PYTHONBIN = "${pkgs.python38Full}/bin/python3.8";
    LANG = "en_US.UTF-8";
  };
}
1 Like