Whenever I run python script on windows command prompt, the command prompt shuts down automatically.
Does anybody know the reason? How can continue working on windows command prompt even while my python script is running? Please help.
Related
I was working on a python project where I was about to run it, but then the command prompt responded with: "'python' is not a known bash or shell command."
I tried closing and opening the command prompt, but this time it worked. I don't really have a problem with it, but just wanted to know why this happened.
I have a Python file called log_reg that I'm just trying to run in the anaconda prompt. I use the following commands:
cd Desktop
cd ML_models
python log_reg.py
I hit enter, and I don't get and error, but I also don't get any result or the file I'm trying to run. What should I do?
You should try running your code from the command line and see if it works. Go to the command line and type python log_reg.py and see if it runs. If so you'll know your code is correct. Then you can try running it at the Anaconda prompt.
I have installed Python 3.8.2 in my Windows 10 laptop
When I run the command 'python' in the command prompt, it gives me a blank response and goes back to the command prompt.
However when I run the command 'py -3' in the command prompt, python is launched.
What can be the reason for this. Is there anyway I can launch python using the 'python' command in cmd?
why does it need to be python? py is basically the same thing. Looks like you didn't check ambient variable in python installation. Just add python folder in PATH ambient variable and you're ready to go
I've installed python 2.7 on my machine. Although path variables are set properly, whenever I fire python command, it opens up python prompt in new window. If I try to run it as an administrator, it works fine. But gives an issue for normal user.
It is resolved, python.exe was by default running as an administrator when python command was fired. Resetting it helped in resolving the issue.
reference_image
I'm not sure if python subprocess stuck the system. I run the GenomeAnalysisTK-3.4-46 as a subprocess through the python os.system(). But the java GenomeAnalysisTK.jar command status turned to "D" which can't be killed. when i run top -u username i get this, but if i click 'c', it stuck the terminal.
Beside, if i run the command ps aux,the command is blocked and the terminal is stuck. Even though the system runs well, it's really annoying monitoring your commands when the terminal stuck all the time.
I tried to figure out how it stuck system command,i prompted strace ps aux,i got this, the process can't be killed, and more and more command blocked when met the process. What i can do is reboot server manually by pressing power off, because restart command didn't work.
My python version is 2.7.6, and ubuntu release is Ubuntu 14.04 LTS.
I want to know how it happened and how to fix it up not by pressing power off.