I got error while running django with daphne

This is the error:

/usr/bin/env: ‘./python3’: No such file or directory 
exit status 127 


stackoverflow: “Value 127 is returned by /bin/sh when the given command is not found within your PATH system variable* and it is not a built-in shell command”

I think there’s an issue with the connecting paths.

Check your system path environment variable to see if you have the correct command, and maybe check config for the right versions.

Running your code and doing some troubleshooting by hand, this command fixes that error (Run in the Shell or Console tab):

ln -s /home/runner/$REPL_SLUG/venv/bin/python3

After doing this, run your program again.

ln: failed to create symbolic link './python3': File exists

Try running your program now, what happens?

ImportError: cannot import name 'ParamSpec' from 'typing_extensions' (/home/runner/django/venv/lib/python3.8/site-packages/typing_extensions.py) 

Run these three commands to be safe:

rm python3
ln -s /home/runner/$REPL_SLUG/venv/bin/python3
pip install typing-extensions==4.3.0
  1. Removes any “bad” copy of python3 (Should it exist)
  2. Makes a new symbolic link to python3
  3. Fixes typing-extensions

It worked. Thank you

Happy to help! If your issue is now resolved, please mark my post as the solution so this topic can close.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.