Adding python to /usr/bin/env python variable
6,172
If you're using bash (which you probably are in a default Ubuntu install) you need to use export
to set an environment variable on the command line.
export PATH=$PATH:/usr/bin
See @chaos's comment as well. Make sure env
is showing your proper $PATH
, eg:
bash-3.2$ env | grep PATH
PATH=/usr/bin:/bin:/usr/sbin:/sbin
bash-3.2$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin
Author by
anonymous
Updated on September 18, 2022Comments
-
anonymous over 1 year
The
#!/usr/bin/env
python hashbang isn't working on my Ubuntu install.I tried the following:
root@x# python=/usr/bin/python root@x# PATH=$PATH:/usr/bin/python
-
chaos over 9 yearsCan you please post the output of
env | grep PATH
andenv python --version
andwhich python
? -
user9517 over 9 yearsIt's not clear exactly what's not working.
-