Apr-11-2017, 03:45 PM
i faced difficult: how to convert my program .py into .exe. i couldn't find answer in internet. my try was not success. i word with python 2.7.
forward looking
forward looking
(Apr-11-2017, 04:13 PM)sparkz_alot Wrote: [ -> ]Is your target system Windows? Linux? Mac? Combination of OS's?windows7
(Apr-11-2017, 08:24 PM)snippsat Wrote: [ -> ]PyInstaller,Py2exe,cx_Freeze all for for 2.7,so you most explain what the trouble is.i want to have code.maybe for command line. thank you
If you search i have code for all on this forum.
Quote:i want to have code.maybe for command line. thank youIf you research it a little there is code provided for each package
Quote:maybe for command line.PyInstaller is the most simple to use.
pip install pyinstaller pyinstaller yourprogram.pyHere a run i did in a earlier post with virtual environment.
# Make virtual enviroment C:\Python35 λ python -m venv pyinstaller_test C:\Python35 λ cd pyinstaller_test # Activate virtual environment C:\Python35\pyinstaller_test λ C:\Python35\pyinstaller_test\Scripts\activate.bat (pyinstaller_test) C:\Python35\pyinstaller_test # Check that pip from virtual environment is used (pyinstaller_test) C:\Python35\pyinstaller_test λ pip -V pip 8.1.1 from c:\python35\pyinstaller_test\lib\site-packages (python 3.5) # Install pyinstaller (pyinstaller_test) C:\Python35\pyinstaller_test λ pip install pyinstaller Collecting pyinstaller Using cached PyInstaller-3.2.1.tar.bz2 Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\python35\pyinstaller_test\lib\site-p ackages (from pyinstaller) Collecting future (from pyinstaller) Using cached future-0.16.0.tar.gz Collecting pypiwin32 (from pyinstaller) Downloading pypiwin32-219-cp35-none-win32.whl (7.9MB) 100% |################################| 7.9MB 156kB/s Installing collected packages: future, pypiwin32, pyinstaller Running setup.py install for future ... done Running setup.py install for pyinstaller ... done Successfully installed future-0.16.0 pyinstaller-3.2.1 pypiwin32-219 # Make exe (pyinstaller_test) C:\Python35\pyinstaller_test λ pyinstaller hello.py A lot of install stuff........... 8040 INFO: Building COLLECT out00-COLLECT.toc completed successfully. (pyinstaller_test) C:\Python35\pyinstaller_test λ cd dist (pyinstaller_test) C:\Python35\pyinstaller_test\dist λ cd hello # Test exe (pyinstaller_test) C:\Python35\pyinstaller_test\dist\hello λ hello.exe Hello World
(Apr-11-2017, 08:58 PM)snippsat Wrote: [ -> ]Quote:maybe for command line.PyInstaller is the most simple to use.
You install with pip and point to code(.py).
pip install pyinstaller pyinstaller yourprogram.pyHere a run i did in a earlier post with virtual environment.
# Make virtual enviroment C:\Python35 λ python -m venv pyinstaller_test C:\Python35 λ cd pyinstaller_test # Activate virtual environment C:\Python35\pyinstaller_test λ C:\Python35\pyinstaller_test\Scripts\activate.bat (pyinstaller_test) C:\Python35\pyinstaller_test # Check that pip from virtual environment is used (pyinstaller_test) C:\Python35\pyinstaller_test λ pip -V pip 8.1.1 from c:\python35\pyinstaller_test\lib\site-packages (python 3.5) # Install pyinstaller (pyinstaller_test) C:\Python35\pyinstaller_test λ pip install pyinstaller Collecting pyinstaller Using cached PyInstaller-3.2.1.tar.bz2 Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\python35\pyinstaller_test\lib\site-p ackages (from pyinstaller) Collecting future (from pyinstaller) Using cached future-0.16.0.tar.gz Collecting pypiwin32 (from pyinstaller) Downloading pypiwin32-219-cp35-none-win32.whl (7.9MB) 100% |################################| 7.9MB 156kB/s Installing collected packages: future, pypiwin32, pyinstaller Running setup.py install for future ... done Running setup.py install for pyinstaller ... done Successfully installed future-0.16.0 pyinstaller-3.2.1 pypiwin32-219 # Make exe (pyinstaller_test) C:\Python35\pyinstaller_test λ pyinstaller hello.py A lot of install stuff........... 8040 INFO: Building COLLECT out00-COLLECT.toc completed successfully. (pyinstaller_test) C:\Python35\pyinstaller_test λ cd dist (pyinstaller_test) C:\Python35\pyinstaller_test\dist λ cd hello # Test exe (pyinstaller_test) C:\Python35\pyinstaller_test\dist\hello λ hello.exe Hello World