Python IDLE will not open - python

After fumbling with some keys on my keyboard while trying to get a script to run by clicking on Run in python IDLE I must of did something, because now python will not open. It opens from the command prompt fine, but the normal way it will not open whatsoever. I tried repairing and reinstalling. Still no luck. I am on Windows 7 machines 64bit, using the 32bit version of python 2.7. No idea what it could be but I did find something on google that mentioned something about keybindings or something? Please help!

try executing C:\path\to\python.exe -m idlelib.idle in command prompt, is there any error message?

Related

Python IDLE is not launching

Error screenshot of 'python3 -m idlelib'[] [This is where the idle is located]Sample screen shot of the program here I recently deletd my old python program and intsalled a new one but now the Python IDLE is not launching when I click it from the start program. Also tried ruuning as a administartor. But when I open the cmd and type: "python3" I am getting the terminal. But I need to code in the python IDLE.
I have adde the image of the python IDLE, if i click that program the notepad/termiunal is not opening.
I got it solved. It seems my 1. I haven't added my path in the user variablse and 2. In system variables the path given is wrong. And yes as said by #TerryJanReedy I have installed both microsoft and python.org versions, so I deleted all files and carefully re-installed again.

Running python on Command prompt:Access is Denied

I installed python long back and worked fine for all these months, I could install libraries from command prompt..run python programs using shell from vba until one day..It started failing, I am able to run python scripts from idle but not from command prompt or vba. I have tried checking my permission but to no success.
If I type python on command prompt, it says the app can't run on this pc and later "Access Denied" displays on the prompt.
To someone who might find this: I had the same problem, when I checked the python.exe file located at C:\Users{your user}\AppData\Local\Programs\Python\Python37 it had 0 bytes, I just reinstalled it to solve the problem, I don't know how this happened.

IPython won't launch after install

Just got a fresh 64bit box running windows vista, installed Python 2.7.3 and IPython 0.12.1, but IPython didn't seem to create any program folders.
Even if I run the .exe file from C:\Python27\Scripts, the terminal just flashes for a moment.
Any thoughts?
It sounds like a common problem - you need to install distribute before installing IPython. We don't know how to add it to the start menu without that.
Usually when there is an error, it shows error message and get out. That is why you are seeing the flash.
Run the executable from command line and you can check out what that error is.

Python 2.7 not loading in Cygwin

I'm having an issued getting my install of python27 to load correctly in Cygwin. My install has 2.6 (/bin/python# ) on it, but I'd like the default Python environment to be 2.7 (/cygdrive/c/Python27/python.exe). I know how to change my $PATH and all, but when I try to run this 2.7 installation through Cygwin by going to its directory and typing python it never loads; I have to end the command with CTRL-c. Is this a Cygwin problem, a Windows problem, or a me problem?
I think you can find some answers in this other question.
It is rather a problem of using the Windows version of Python with the Cygwin terminal.
Quick summary:
for interactive mode, add the -i option
if you want to see the output of your script, add the -u option.
I faced the same problem with Python 2.7 on Cygwin. Launching Python with -i option did get me to the interpreter, but it would not allow the use of the "up" cursor key to repeat older commands.
What you need to do is to launch the /bin/bash.exe from a DOS prompt. This will launch the standard Windows console instead the Cygwin console.
This answer sums it up pretty well.

How can I run a python script on windows?

Can anyone please tell me an IDE for running python programs? Is it possible to run the program through command line?
Take a look at ActiveState's ActivePython. It's quite a nice implementation of Python on Windows. Another way is using Cygwin's Python port. These two are Python implementations. I don't use an IDE, I write my Python code in Notepad++.
To run a python program after saving it to C:\Users\vaibhav\Code\myscript.py:
ActivePython: If I remember right, ActiveState updates the path correctly. So it should be a s simple as:
Press "start" in the task bar
In the search field search for "cmd"
In the appearing box navigate to your folder with the python script: dir Users\vaibhav\Code
call python myscript.py and you're done
Cygwin: After installing Cygwin, you have a full-featured bash terminal on your Windows machine.
click on the Cygwin icon on your desktop
In the appearing window navigate to the folder with your python script: cd /cygdrive/c/Users/vaibhav/Code
type python myscript.py
e voila
IDE for running scripts? You can have any IDE you like, but if you need only to run python scripts you go like this:
python.exe pythonScript.py
I like the EasyEclipse for python distribution. You'd need to have python and java installed of course.
PyDev and Komodo Edit are 2 nice Python IDE on Windows.
I also like the SciTE text editor very much.
These 3 solutions make possible to run Python scripts
I tried to run a Python script with multiprocessing on windows. see this tutorial
It does not work on Windows, but on raspian it went very well. Thus I knew that it was a Windows problem. I installed cygwin and followed this tutorial Installing Python inside Cygwin.
After that I additionally installed numpy with the command easy_install numpy and now i can run python scripts with multiprocessing on windows (from cygwin).

Categories