It looks like you are trying to use python 3.11
Here’s a few more steps for it to work:
In replit.nix file
From deps, remove:
pkgs.replitPackages.prybar-python311
pkgs.replitPackages.stderred
From env, remove:
PRYBAR_PYTHON_BIN
STDERREDBIN
In .replit file
Delete the entire [interpreter] block, possibly lines 15-27
Change channel, possibly on line 13, from "stable-22_11" to "stable-23_05"
In PYTHONPATH, possibly on line 18, update the 2 occurrences of 3.10 to 3.11
In venv folder
In venv/lib folder, rename folder python3.10 to python3.11. This may take a while
In venv/include, if there is one, rename folder python3.10 to python3.11
Refresh
Refresh, or reload the shell, and now your repl runs python 3.11, with a working packages tab
Thank you for your help! But when I install a package , it show this error in pip
~/test$ pip install discord
error: externally-managed-environment
× This environment is externally managed
╰─> This command has been disabled as it tries to modify the immutable
`/nix/store` filesystem.
To use Python with Nix and nixpkgs, have a look at the online documentation:
<https://nixos.org/manual/nixpkgs/stable/#python>.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: python3.11 -m pip install --upgrade pip
Here’s the .replit file
run = "cowsay Configure me!"
[nix]
channel = "stable-23_05"
[env]
VIRTUAL_ENV = "${REPL_HOME}/venv"
PATH = "${VIRTUAL_ENV}/bin"
PYTHONPATH = "$PYTHONHOME/lib/python3.11:${VIRTUAL_ENV}/lib/python3.11/site-packages"
REPLIT_POETRY_PYPI_REPOSITORY = "https://package-proxy.replit.com/pypi/"
MPLBACKEND = "TkAgg"
POETRY_CACHE_DIR = "${REPL_HOME}/.cache/pypoetry"
POETRY_INSTALLER_MODERN_INSTALLATION = "0"
[debugger]
support = true
# How to start the debugger.
[debugger.interactive]
transport = "localhost:0"
startCommand = ["dap-python", "main.py"]
# How to communicate with the debugger.
[debugger.interactive.integratedAdapter]
dapTcpAddress = "localhost:0"
# How to tell the debugger to start a debugging session.
[debugger.interactive.initializeMessage]
command = "initialize"
type = "request"
[debugger.interactive.initializeMessage.arguments]
adapterID = "debugpy"
clientID = "replit"
clientName = "replit.com"
columnsStartAt1 = true
linesStartAt1 = true
locale = "en-us"
pathFormat = "path"
supportsInvalidatedEvent = true
supportsProgressReporting = true
supportsRunInTerminalRequest = true
supportsVariablePaging = true
supportsVariableType = true
# How to tell the debugger to start the debuggee application.
[debugger.interactive.launchMessage]
command = "attach"
type = "request"
[debugger.interactive.launchMessage.arguments]
logging = {}
# Configures the packager.
[packager]
language = "python3"
ignoredPackages = ["unit_tests"]
[packager.features]
enabledForHosting = false
# Enable searching packages from the sidebar.
packageSearch = true
# Enable guessing what packages are needed from the code.
guessImports = true