Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
701 views
in Technique[技术] by (71.8m points)

batch file - installing cx_Freeze to python at windows

I am using python 3.4 at win-8. I want to obtain .exe program from python code. I learned that it can be done by cx_Freeze.

In MS-DOS command line, I wrote pip install cx_Freeze to set up cx_Freeze. It is installed but it is not working.

(When I wrote cxfreeze to command line, I get this warning:C:UsersUSER>cxfreeze 'cxfreeze' is not recognized as an internal or external command,operable program or batch file.)

(I also added location of cxfreeze to "PATH" by environment variables)

Any help would be appriciated thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I faced a similar problem (Python 3.4 32-bit, on Windows 7 64-bit). After installation of cx_freeze, three files appeared in c:Python34Scripts:

  • cxfreeze
  • cxfreeze-postinstall
  • cxfreeze-quickstart

These files have no file extensions, but appear to be Python scripts. When you run python.exe cxfreeze-postinstall from the command prompt, two batch files are being created in the Python scripts directory:

  • cxfreeze.bat
  • cxfreeze-quickstart.bat

From that moment on, you should be able to run cx_freeze.

cx_freeze was installed using the provided win32 installer (cx_Freeze-4.3.3.win32-py3.4.exe). Installing it using pip gave exactly the same result.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...