ThisIsAQuestion
ThisIsAQuestion

Reputation: 1967

Running py2exe with multiple versions of python installed

I have both python 3.2 and python 2.7 installed. I am trying to compile a file, but since the default program for opening .py files is 3.2, it gives me an error for not having py2exe installed when I run the program. I tried setting the default program to python 2.7, but it won't work because the two versions have the same name. I changed the name for python 2.7, but the program wouldn't run at all. What do I do?

Upvotes: 1

Views: 727

Answers (2)

thkang
thkang

Reputation: 11543

use absolute path to point to python interpreter executable.

c:\python27\python.exe setup.py py2exe

Or install cx_Freeze, which seems much better than py2exe except the lack of onefile capability.

Upvotes: 1

Ecliptica
Ecliptica

Reputation: 840

You need to make sure C:\Python27 is the in your Path environment variable, and that C:\Python33 isn't. But as Blender's comment mentions, you can't use py2exe with Python 3.x.

See here for how to change your environment variables in Windows 7.

Upvotes: 0

Related Questions