Question

I had python 2.7 on my machine running just fine. I decided to install python 3.3 on my computer and changed my environment variable path to C:\Python33 instead, intending that to be my main one. Running IDLE on python 3.3 works just fine, but for some reason, IDLE (and Tkinter) in python 2.7 no longer works. When I run the following command in the command prompt:

PS C:\python27\lib\idlelib> C:\python27\python.exe idle.py
** IDLE can't import Tkinter. Your python may not be configured for Tk. **

Clearly I'm doing something wrong, or my installation of 3.3 messed something up. Can anyone help?

Was it helpful?

Solution 2

My memory isn't perfect...but for encountering this question much later and wondering, I ended up fixing my problem by uninstalling both versions (a pain, I know) and reinstalling with Python 3.3 first and Python 2.7 second. For some reason, after this I was able to run both versions of IDLE (in their respective folders) with no problem.

OTHER TIPS

This is just a idea but python 2.7 and 3.3 versions have minor differences on coding ex - input and raw input difference. So i think the version developers make a exception if you run your 2.7 code on 3.3 compiler.

My suggestion better have 2 environment variables for both versions because as i told before syntax are different from 2.7 to 3.3 minor way .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top