Bash and path issue
Attempted running of "filename.py", having "#!/usr/bin/env python" as first line, by commanding "filename" from inside a subfolder of /usr/local failed with error
bash: filename.py: command not found. I had to command either "python filename.py" or "./filename.py" in order that the python program executes. Question: how to fix "bash" in order that the directory from where the command was issued is on my path? thanks, chiendarret |
Create this file in folder where by standard system searches for execute, so: "/usr/local/bin" or "$HOME/bin" if this is added to your PATH. Eventually add this directory to PATH environment variable. For example
Quote:
|
Your shell will only execute commands that have a clear absolute or relative path prefixing them, or are in a directory defined by your $PATH variable.
Permanent modifications of PATH are done in your shell start-up scripts. See the INVOCATION section of the bash man page for a description of which files it loads when starting on your system. |
Thanks
|
All times are GMT -5. The time now is 04:02 PM. |