Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-21-2009, 02:09 AM   #1
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
How do I add python to the PATH...

Python command is in /usr/bin and I have /usr/bin in my $PATH. I want to be able to run


instead of having to do


What do I need to do?
Old 03-21-2009, 02:12 AM   #2
LQ Newbie
Registered: Mar 2009
Posts: 23

Rep: Reputation: 17
Do you have the command directive on the first line of the python script?

#!/usr/bin/env python

Have you set the execute bit on the file?

chmod +x

Old 03-21-2009, 09:11 AM   #3
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
Yes I have


Yes I have the execute bit on

The program runs if I do

sudo python ./

But I want to be able to do

sudo ./


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python: Can you add text to an image in python? BrianK Programming 2 04-03-2008 03:56 PM
Do you add to the path line or make a new path in /etc/profile? M$ISBS Linux - Newbie 2 12-13-2006 02:14 PM
Python upgradation,setting compiler $PATH jared78 Linux - Newbie 9 01-20-2006 12:12 AM
Python Add Image Gerardoj Programming 2 11-09-2003 04:24 PM
How do I change python search path Giallo998 Linux - Software 1 10-22-2003 07:27 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration