Problem with python3 e replit.nix

**i have a problema with replit: i can’t install anything package because replit don’t found python3 so i can’t install all package
Screenshot 2023-05-02 215455
**

Repl link

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
copied source '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/python-modules/recursive-pth-loader/sitecustomize.py' -> '/nix/store/plfxxq6siry726sjd7j98k8qrngvyjmc-sitecustomize.py'
instantiated 'python-recursive-pth-loader-1.0' -> '/nix/store/v67ryd4iha4bj940851l7x05sllzprfk-python-recursive-pth-loader-1.0.drv'
instantiated 'bluez-5.62.tar.xz' -> '/nix/store/9niqnap65a3vnwx0gkkay49anfgq4i7d-bluez-5.62.tar.xz.drv'
instantiated 'bluez-5.62' -> '/nix/store/2pbyrk81xg5f2fic77rxw0wr412qh9kg-bluez-5.62.drv'
copied source '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/interpreters/python/cpython/3.8/no-ldconfig.patch' -> '/nix/store/p4qar37zn2892m83b2lkp8fw5dsjkzxy-no-ldconfig.patch'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/libraries/tix/default.nix'
instantiated 'tix-8.4.3-tcl8.5.patch' -> '/nix/store/6ip2wvy0dnlr4pdh3hr4m6941ha3sg0c-tix-8.4.3-tcl8.5.patch.drv'
copied source '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/libraries/tix/duplicated-xlowerwindow.patch' -> '/nix/store/bfhd48m318nz4p2qbvnvcr927w8crgsy-duplicated-xlowerwindow.patch'
instantiated 'tix-8.4.3-tcl8.6.patch' -> '/nix/store/rvp6ml1gqcp6dhcmdy597qdpxsw26c5d-tix-8.4.3-tcl8.6.patch.drv'
instantiated 'Tix8.4.3-src.tar.gz' -> '/nix/store/3zfm8vmlcqjrq1f1gzy7ir2bd200z1li-Tix8.4.3-src.tar.gz.drv'
instantiated 'tix-8.4.3' -> '/nix/store/lpk480qbkh1yzdscia19xr3879d2nnpp-tix-8.4.3.drv'
instantiated 'python-setup-hook.sh' -> '/nix/store/fbyk637ljv7n7l8lj9nprhg8ll8rprqh-python-setup-hook.sh.drv'
instantiated 'Python-3.8.12.tar.xz' -> '/nix/store/b0gb1wi6kis0vj408hvcl7qrldzvkzdn-Python-3.8.12.tar.xz.drv'
instantiated 'python3-3.8.12' -> '/nix/store/zjrw940xzm9q88s99cdnb6y5ijkakkd9-python3-3.8.12.drv'
instantiated 'python-setup-hook.sh' -> '/nix/store/h5jdf7hgya551hn2lxmx5d5qsba4bxgw-python-setup-hook.sh.drv'
instantiated 'Python-3.9.6.tar.xz' -> '/nix/store/j6c05y90ajir6gf9knzmkrzfhpgh2cz4-Python-3.9.6.tar.xz.drv'
instantiated 'python3-3.9.6' -> '/nix/store/ad1y11jcnxwbk4yx9cvi0yvi57yqfxhz-python3-3.9.6.drv'
error: attribute 'nextcord' missing, at /home/runner/LaboCraft-MC/replit.nix:4:5
(use '--show-trace' to show detailed location information)

Are you using a python REPL template?

yes, i use a python template for do my bot but i today when i opened replit i got this error

Try to fork the repl and see if this solves it

nope i fork the repl but doesn’t work:
 /home/runner/LaboCraft-MC-1/venv/bin/python3: line 3: exec: : not found
exit status 127

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
instantiated ‘python3.9-pytest-xprocess-0.18.1’ → ‘/nix/store/sh7kh3i23jcc9k26vbi7ql2y3rl4zz6j-python3.9-pytest-xprocess-0.18.1.drv’
evaluating file ‘/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/python-modules/watchdog/default.nix’
evaluating file ‘/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/python-modules/pathtools/default.nix’
instantiated ‘pathtools-0.1.2.tar.gz’ → ‘/nix/store/s87k206gibws3f0k813d4qzw8mmqc4q5-pathtools-0.1.2.tar.gz.drv’
instantiated ‘python3.9-pathtools-0.1.2’ → ‘/nix/store/wpapihia1wy344llchycmnm43z3xgbs0-python3.9-pathtools-0.1.2.drv’
evaluating file ‘/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/python-modules/pyyaml/default.nix’
evaluating file ‘/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/development/libraries/libyaml/default.nix’
instantiated ‘source’ → ‘/nix/store/ad9a3k4k319jfj4a11apfasaqkyla6cz-source.drv’
instantiated ‘libyaml-0.2.5’ → ‘/nix/store/i1dkk8qm4d4qm5j769dpbnkscv4nzcqi-libyaml-0.2.5.drv’
instantiated ‘source’ → '/nix/store/ijn4dz1hvw5skdq15f0n403
Traceback (most recent call last):
File “main.py”, line 9, in
from captcha.image import ImageCaptcha
ModuleNotFoundError: No module named ‘captcha’

What happens if you go in the Shell and run:

pip install captcha

or

poetry add captcha

Also, please provide your replit.nix file, as your original error seems to indicate a nix error.

3 Likes

it gives me this error:
/home/runner/LaboCraft-MC/venv/bin/python3: riga 3: exec: : not found

Please provide your replit.nix file, as that error usually arises from issues from within that file. If you cannot see the file, click on the three dots above your files, then Show Hidden Files.

Screenshot 2023-05-03 141652

replit{ pkgs }: {
deps = [
pkgs.python39Full
pkgs.python39Packages.flask
pkgs.python39Packages.captcha
];
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”;
};
}

Is this project supposed to be running on python 3.8 or 3.9? Your replit.nix contains both, so I’m checking before I proceed.

3.9 but I don’t know why if I also try to see the python versions it gives me an error

Try changing the PYTHONBIN to "${pkgs.python39Full}/bin/python3.9". I’m not certain that will work, but it’s worth a try.

this metod doesn’t work