Python 3.10 on replit
Basically put this in your .replit
file:
run = "(python3.10 --version || install-pkg python3.10) && clear && python3.10 main.py"
Explanation:
(python3.10 --version || install-pkg python3.10)
: check the version of python3.10, if it exited non-zero install it
clear && python3.10 main.py
: clear the screen and run main.py
Python 3.10 is not the full release until October (currently beta), and I doubt very much that replit will add it then, so use this .replit
file if you want to run the new features.
Does this work with external packages from PyPI (pip install ____
or Replit's packaging manager)?
why do you need python 3.10
@IMayBeMe bru..., please see the python 3.10 changelogs, its got better error predictions and all
@rejevichb This is pretty much the only reason why i want to update lol
@CarpalEnderman same + the error matching
@TheNerd21 fart: a reflex that expels intestinal gas through the anus
@ch1ck3n It has a bunch of useful features that 3.8.12 (current REPLit default) doesn't have.
MATCH CASE that's [email protected]
UPDATED (using nix):
make a new nix repl: https://replit.com/new/nix
put this into
replit.nix
:put this in
.replit
@19ecal only problem with nix repls is that pip doesn't work with 3.10. I've tried ensurepip and get-pip.py as well and it doesn't work. Only 3.8-3.9 packages are available.