0

I already have python 2.7 (installed using activepython). I'm trying to use python 3.2 just to learn more about it so i downloaded it from python.org

python 2.7 still works perfectly, but python 3.2 gives me this error when i try to open the ide.

enter image description here

and then I see the send error window, if i install python 3.2 using activepython i see the same error.

I'm using windows xp pro sp3 32 bit and i had the same error on sp2... How do I fix it?

EDIT @Zuljin

This is the first time that i use dependancy walker so could you give me a hand please

this is what i see

enter image description here

what does that mean? I already have these files...

Community
  • 1
  • 1
Lynob
  • 5,059
  • 15
  • 64
  • 114
  • Take the 'w' off and try to open C:\Python32\python.exe? Use task manager to make sure that you do not have existing pythonw instances running. I've seen issues with the sessions terminating occasionally. – Lance Collins Dec 05 '11 at 22:46
  • ...seriously though: I don't know about Microsoft's OS, but if you run `pythonw.exe` from the prompt, won't you be able to see a more specific error message? – mac Dec 05 '11 at 22:47
  • @mac if i run pythonw.exe i see nothing lol – Lynob Dec 05 '11 at 22:56
  • @LanceCollins In order to take the "w" from pythonw, i have to rename python.exe to something else and even then - python 2.7 won't work and python 3.2 will show me the send error window - but the runtime error will disappear ... close lol... almost fixed it :( – Lynob Dec 05 '11 at 23:00
  • You do not need to rename anything, both distros have both python and pythonw executables. IMHO the answer is not just switching to linux. Python is fairly robust in windows. Installation of the distros, libraries, etc is often only two clicks or a `python setup.py install`. Sorry I can not say always the same for linux – joaquin Dec 05 '11 at 23:38
  • For me this looks like missing Microsoft Visual C++ Redistributable Package. I'm not sure but I think Python 3.2 is compiled using VS 2008 so probably you should check if you have this http://www.microsoft.com/download/en/details.aspx?id=5582 or this http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29 package installed. – Zuljin Dec 05 '11 at 23:50
  • @Zuljin I have just downloaded and installed it because you said so lol :D the same error lol :D – Lynob Dec 05 '11 at 23:57
  • If my advice doesn't help then you may use Dependency Walker http://www.dependencywalker.com/ to check if you have all required libraries installed. – Zuljin Dec 05 '11 at 23:57
  • Umm, why are you still using windows xp? Give yourself an early christmas present and upgrade to win7!!!! – Lance Collins Dec 06 '11 at 00:42
  • @LanceCollins win 7 is too big for this pc, it's quite old lol. as i said when i buy a new laptop I'll change the os, but i really want to try linux coz i tried win 7, good and fast can't deny it but never tried linux, i tried it on virtualbox, on my vps, backtrack 5, but never as a main OS – Lynob Dec 06 '11 at 00:54
  • @Lance Collins I'm running ActiveState py2.6 + py3.2 + ActiveState Perl + FreePascal + Haskell + Lisp + QL-Superbasic emulator on a NC10 Samsung with win XP. And it goes like a charm ! – joaquin Dec 06 '11 at 11:13

3 Answers3

1

Python 2.x and 3.x can cohabitate perfectly in win xp and win 7, either 32 or 64 bits. If you first installed the ActiveState Python distribution, be careful when installing python-3.2.2.msi. When you arrive to the customize python 3.2.2 screen, (un)check 'register extensions' to make the feature unavailable (that is: do not register extensions).

I have installed this way both distributions in different computers without any problem so far.

Note: Check your environment variables. Only python 2.7 should be in the path (if you installed before the two distros you could have them both in the path. Remove python 3.2 path)

Edit: From Ankit post I realized that in fact you were trying to open IDLE, maybe. If you follow my installation instructions when you call idle.bat from the py3.2 idlelib folder you actually get idle for python 2.7 as this is what the call find in the windows path. To be able to open idle for py3.2 in the presence of python 2.7 as the registered python, I use a .bat file modified from that in the distribution:

idle_stay.bat

@echo off
rem Working IDLE bat for Windows - Custom bat for py3k as secundary python
C:\Python32\pythonw C:\Python32\Lib\idlelib\idle.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9

The name idle_stay.bat is because I put this file in the folder where the official idle.bat is (C:\Python32\Lib\idlelib\idle_stay.bat). In this way it does not get overwritten each time I unisntall and reinstall a new version of python 3

joaquin
  • 82,968
  • 29
  • 138
  • 152
  • didn't find python 3.2.2 in my path, i found python 2.5 and i removed it coz i don't use it...anyway still the same error, any other ideas? – Lynob Dec 05 '11 at 23:51
  • 1
    Can not help. Maybe you should try to uninstall both distros, clean any fingerprint of them in the register and make a fresh reinstall. – joaquin Dec 05 '11 at 23:55
  • Python 2.5?. Ooops, should not be python 2.7. It seems you have things a bit messed up – joaquin Dec 05 '11 at 23:58
  • no I'm not gonna uninstall python 2.7 coz i have soooo many libraries on it... btw it's an old problem, so i tried to uninstall them both before and the same thing happened :D thx for your time lol anyway! i really appreciate it! enjoy the classico this saturday lol :D – Lynob Dec 06 '11 at 00:00
  • I have uninstalled python 2.5 long long time ago, don't know why it's still in my environment variables – Lynob Dec 06 '11 at 09:32
1

I saw a lot of answers here. But, I think the file that you are trying to run is not correct

C:\Python32\Pythonw.exe

is not the one you use to open idle.

Open

C:\Python32\Lib\idlelib\idle.pyw
Ankit
  • 6,772
  • 11
  • 48
  • 84
  • my pc can't open the file, it shows me an **open with** window and i have to choose a program to open it with, what to do now? – Lynob Dec 06 '11 at 00:59
  • that is odd! it should not happen. Try reinstalling python3. Because, this would happen only if it cannot understand python file. Or better, before reinstalling, select python.exe when the "open with" window pops up. – Ankit Dec 06 '11 at 01:42
  • btw you can find the python.exe in the c:\python32 folder. let me know what happens? – Ankit Dec 06 '11 at 01:44
  • try reinstalling python3. If nothing works, I won't mind a skype session, if its too important for you to get them working. – Ankit Dec 07 '11 at 01:21
  • i have been reinstalling python 3 many times and it just won't work, no it's not that important to get python 3 working as my main python is 2.7 thanks brother – Lynob Dec 07 '11 at 09:42
  • no problem. If you need it though, one last thing I will suggest if that when you uninstall python 3, also delete the python32 folder from **c** drive. Now install again. If even this does not work, I think there could be some problem with xp. Also make sure you are installing the correct version of python (depending upon your architecture 32-bit vs 64-bit). – Ankit Dec 07 '11 at 13:08
0

It seems to me you have associated a *.py or *.pyw file extension type to some version of python.exe and/or pythonw.exe you aren't clear about. This is often, but not exclusively done from within Microsoft's "explore.exe" File Manager (I believe in Options).

I disagree that this is a reliable method:

C:\Python32\Lib\idlelib\idle.pyw 

as this method will run whichever program is assigned to the "pyw" extension. That could be:

C:\Python32\pythonw.exe 

or

C:\Python26\python.exe

or whatever might have happened to your file extension association as per OS or bad PATH environment variable setting. It is better to do something like this:

C:\Python32\pythonw.exe C:\Python32\Lib\idlelib\idle.pyw

where you are explicidly telling the OS to run the python executable from a specific path and selecting a specific python script in the file/folder hiearchy.

Another thing you can try to gather info is just:

python.exe -V

which will tell you the version number.

Another thing you can do: Open a DOS command prompt and type:

set PATH=C:\Windows;C:\Windows\system32;C:\Python32
python.exe      and note the version and whether is runs.
exit()
exit

Once working debug your PATH. You can use this Python script to gather intel.

If you turned off your WinXP findfile stuff (like I have) you can use this script:

inpath.py can help shed some light. Run this python script like this:

  1. Drop to a DOS prompt
  2. cd to your folder with a working python.exe version.
  3. and type python.exe inpath.py python* where inpath is in that same folder for this test/debug.

inpath.py will search your path for all files associated as "runable" in your OS and that is in your "PATH" with the python*.* pattern.

DevPlayer
  • 5,393
  • 1
  • 25
  • 20