473,569 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a Exe of an Pyton Aplication in Windows and UNIX

440 Contributor
Hi,
I want to create a Exe of an Pyton Aplication in Windows and UNIX.For example,Ihave the following ".py"files

Sample1.py
Sample2.py
Sample3.py
............... .
Samplen.py

Main.py

I would like to create an exe for the above files to support for Windows and UNIX OS.

Thanks
PSB
Mar 4 '07 #1
27 5312
ghostdog74
511 Recognized Expert Contributor
Hi,
I want to create a Exe of an Pyton Aplication in Windows and UNIX.For example,Ihave the following ".py"files

Sample1.py
Sample2.py
Sample3.py
............... .
Samplen.py

Main.py

I would like to create an exe for the above files to support for Windows and UNIX OS.

Thanks
PSB
what happens to googling? pyinstaller
Mar 4 '07 #2
bartonc
6,596 Recognized Expert Expert
Hi,
I want to create a Exe of an Pyton Aplication in Windows and UNIX.For example,Ihave the following ".py"files

Sample1.py
Sample2.py
Sample3.py
............... .
Samplen.py

Main.py

I would like to create an exe for the above files to support for Windows and UNIX OS.

Thanks
PSB
I don't think this works on *nix. There are two articles on EXE creation in Python > Articles. Truelove911 has given basics of PyInstaller and py2exe.
Mar 4 '07 #3
ghostdog74
511 Recognized Expert Contributor
well, pyinstaller is supposed to work under windows, linux and irix, as stated in the project page. havn't tried though.
Mar 5 '07 #4
psbasha
440 Contributor
Facing problem in creating a Py2Exe.

Step -1 ) My Python24 software is available at "C:\Python24".A s suggested in the Article , I Copied the "pyinstalle r-1.3" at the location "C:\Python2 4" after extracting the files.

Step-2 ) Double clicked on Configure.py, and config.dat is created

Step-3) download UPX from http://upx.sourceforge .net/#download (Win32 Console package)

Step-4) After unpacking the archive, copied upx.exe to C:\Python24 directory.

Step-5) Created "HelloWorld .py" at location "C:\Sample"

Step-6)Created HelloWorld.bat

Step-7) Double-click on HelloWorld.bat

After the Step -7 ,I am getting the following error message"'python ' is not recognized as an internal or external command,
operable program or batch file."

-----------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. Error
  2.  
  3. C:\Documents and Settings\xyz>C:\Sample\HelloWorld.bat
  4.  
  5. C:\Documents and Settings\xyz>set PIP=C:\Python24\pyinstaller-1.3\
  6.  
  7. C:\Documents and Settings\xyz>python C:\Python24\pyinstaller-1.3\Makespec.py
  8. --onefile --console --upx --tk HelloWorld.py
  9. 'python' is not recognized as an internal or external command,
  10. operable program or batch file.
  11.  
  12. C:\Documents and Settings\xyz>python C:\Python24\pyinstaller-1.3\Build.py Hel
  13. loWorld.spec
  14. 'python' is not recognized as an internal or external command,
  15. operable program or batch file.
  16.  
  17. C:\Documents and Settings\xyz>
  18.  
  19.  
Apr 21 '07 #5
bartonc
6,596 Recognized Expert Expert
It's this last part
'python' is not recognized as an internal or external command,
operable program or batch file.
that causing the error.
To fix that you need to edit the PATH environment variable to include your python directory.
Apr 21 '07 #6
psbasha
440 Contributor
It's this last partthat causing the error.
To fix that you need to edit the PATH environment variable to include your python directory.
The environment Variable Path is
Path

C:\Python25\;%S ystemRoot%\syst em32;%SystemRoo t%;%SystemRoot% \System32\Wbem;

Could you please let me know whether I have to modify the above path for Python settings

-PSB
Apr 21 '07 #7
bartonc
6,596 Recognized Expert Expert
The environment Variable Path is
Path

C:\Python25\;%S ystemRoot%\syst em32;%SystemRoo t%;%SystemRoot% \System32\Wbem;

Could you please let me know whether I have to modify the above path for Python settings

-PSB
That look correct:
It could be an ActiveState thing. Is there a python.exe in C:\Python25\?
Apr 21 '07 #8
bartonc
6,596 Recognized Expert Expert
That look correct:
It could be an ActiveState thing. Is there a python.exe in C:\Python25\?
Come to think of it, there are two such variables: one is system wide and one is for your log-in. If python.exe is in C:\Python25\, you'd better check the system PATH.
Apr 21 '07 #9
psbasha
440 Contributor
That look correct:
It could be an ActiveState thing. Is there a python.exe in C:\Python25\?
Yes Python Exe is available in that path
C:\Python25\pyt hon25.exe
Apr 21 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
1956
by: Stephen VanDahm | last post by:
I'm looking for a way to install Python on a UNIX machine in a way such that any user on the system can use it, but only to execute scripts that are located in a certain directory. I do not have root access on the machine that will be running Python, so my options are limited. I thought about hacking the Python interpreter itself so that it...
11
1997
by: Mark de+la+Fuente | last post by:
I need to write simple scripts for executing command line functions. Up till now I've used C-Shell scripts for this, but I'm looking for a better alternative. And I keep reading about how “easy” it is to program with python. Unfortunately after reading "diveintopython" and the python tutorial, I'm not sure how to do what I need to do. Here...
3
6534
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then should run on a Unix box I have. Both scripts run ok, except for the part when Windows try's to call out the Unix script. I have it set up where the Unix...
2
5733
by: Matt | last post by:
I'm new to Java but experienced with PL/SQL. I've found what appears to be strange behaviour (a bug?) when attempting to create java stored objects using the UNIX version of Oracle SQL*PLUS 8.1.7.3.0 with JServer 8.1.7.3.0. The reason it seams strange is that the problem only occurs with the UNIX version of SQL*PLUS, not the PC client version...
7
388
by: Marek | last post by:
Whe i'm running my .net aplication from share on other server, i've got an error. Can someone explain what i must do? Unhandle exception:System.Security.SecurityException: Permission demand type System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000. 0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed. at...
5
1468
by: fanor | last post by:
I have a windows aplication and i would like to send email. Does anyone one know what is the yahoo server??? TIA PD: my aplication is in VS 2005 and c#.
6
2026
by: Pep | last post by:
Firstly, I'm not sure if this is the right group for this query, so please forgive me if I am wrong. My problem is that most users I distribute my software to cannot install it on their systems due to not having the correct administrator rights. I'm perplexed over this as I cannot reasonably ask corporations to allow the local secretary to...
0
1013
by: DKn | last post by:
Hello All, I am having an ACtiveX Control developed in C#.Net 2.0 windows Control Library. I have tested this control.TCS through ACtiveX Control Test Container. It is working fine, But the logs are getting created in the folder where the TSTCON32.exe is located, instead of creating in the aplication folder. When i Run the application in...
1
1422
by: KF4fun | last post by:
Recently i am being given a windows aplication which was made using VB.net . I was asked to remake the windows aplication but i found it quite hard to do so because i am new to VB.net . The codes were strangers to me . heres the aplication so can someone please explain to me how this aplication can be made . Thanks a bunch if u could do it ....
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.