Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have Red Hat Enterprise Linux 6.3 installed on two machines. When I try to run a python script on either of them (the same script for testing) it seems to start but immediately end. No pop-ups are present after starting the scripts.
After running the program, it should be asking to change values but it never shows up. Any suggestions on what could be wrong?
I have Red Hat Enterprise Linux 6.3 installed on two machines. When I try to run a python script on either of them (the same script for testing) it seems to start but immediately end. No pop-ups are present after starting the scripts.
After running the program, it should be asking to change values but it never shows up. Any suggestions on what could be wrong?
A few questions for you:
- How are you running this script? From the GUI or from a terminal or ????
- What command are you using to execute the script?
- Are you sure the script works correctly?
- How are you running this script? From the GUI or from a terminal or ????
- What command are you using to execute the script?
- Are you sure the script works correctly?
-I've tried just double-clicking and selecting 'run', and I've tried selecting 'run in terminal'
-I've changed the directory to the where the files are and used 'python (file name)'
-I got the script from someone else but on his machine (same OS and build) it ran just fine.
Last edited by dragonpoet; 08-19-2013 at 08:40 AM.
-I've tried just double-clicking and selecting 'run', and I've tried selecting 'run in terminal'
-I've changed the directory to the where the files are and used 'python (file name)'
-I got the script from someone else but on his machine (same OS and build) it ran just fine.
I'd advise you to use a terminal (or multiple terminals). This makes running/editing the script(s) easier (my opinion).
This should work from a terminal:
Code:
cd /path/to/script_directory
python script_name.py
# mini example
cd /tmp
python test.py
1 + 2 = 3
foo bar foobar
# test.py mini script looks like this
import math
print "1 + 2 =", 1+2
print "foo bar foobar";
You might want to try running the test.py script, just to make sure python is working correctly. If not, please post any error/warning messages that are shown.
If your script isn't too long you might want to post it (do use [code] ... [/code] tags) so we can have a look.
I'm attempting to install the version 3.2.5 and when I do the './configure' there is a message saying "no acceptable C compiler in $Path"
I downloaded the file from the website and it was saved to my Downloads folder. I unzipped it and that is when I ran './configure' Is there something I am doing wrong up to this point?
Last edited by dragonpoet; 08-19-2013 at 10:15 AM.
I'm attempting to install the version 3.2.5 and when I do the './configure' there is a message saying "no acceptable C compiler in $Path"
I downloaded the file from the website and it was saved to my Downloads folder. I unzipped it and that is when I ran './configure' Is there something I am doing wrong up to this point?
Do you have GCC installed? If not, you need to install it.
Ok. Thanks for all the feedback. I had assumed the GCC would have been installed when I installed the OS. Finally got the GCC installed and finishing installing Python 3.2.5. If I have any other problems I'll be sure to ask for your help again. Thank!
GCC is not installed by default. This is because it is an insecure program to have installed, and is widely used for evil on linux systems. Any compiler can be used for evil on an insecure system. So it is a good idea to use GCC to compile whatever you need, then uninstall it.
Ok so following the instructions and running the install, it looks as though everything is fine. Then I tried to run my script again and it still says that the argparse module isn't installed. I checked again the version I have for python and I had assumed it would be 3.2.5 but it still says I am on 2.6.6.
I followed the read me instructions that followed like this:
- ./configure
- make
- make test
- yum make install
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.