How to update replit file from 3.10 to 3.11Full (python)

I tried to update python version via replit.nix (replacing 3.10 with 3.11 but it gets flooded with errors)

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

Image got messed up

What is the error at the very end?

1 Like

When I clicked the image and opened it in imgur it seems it is this:

error: attribute 'prybar-python311' missing, at /home/runner/InferiorIncredibleRoutes/replit.nix:21:28

My guess is that prybar for 3.11 is not released, this is also why the official template has not been updated. @Elex1 The best you can do is configure it to not use prybar, as in just a run command.

1 Like

There is a way to run python 3.11, but it takes a bit of work to set up.
It is not worth it unless you really need the features.
Ask me how, if you do need it.


How bro? you would help me

Recently, there have been some updates that make it very easy to get python 3.11.
Python 3.12 is also possible.

Click three dots near files, and Show hidden files. Then, open .replit file.
You should see a modules variable.
Replace the string in it with one of the strings found in nixmodules/modules.json at main · replit/nixmodules · GitHub, like this:

modules = ["python-3.11:v20-20240105-957ab14"]  # python 3.11

Then refresh. If you have packages, then delete .pythonlibs folder, open pyproject.toml and update the python version, and run poetry update in the Shell.