Python Forum
I can't run my executable pythpn application
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can't run my executable pythpn application
#1
Hi; I use python 3.6, and my PC is equipped with windows 10 64 bits.



for information, my PC is equipped with windows 10 64 bits.

I finished my script.py, and I turned it into an executable application by this command :

Quote:python setup.py build

and I tryed also this other command :

Quote:python setup.py bdist_msi

1) for the first case, I have a build folder that was created and that contains my executable application

2) for the second case, I have two folders build, and dist.
the stucture of the folder "build" is dispalyed by this picture:

[Image: u54c.jpg]

in both cases when I run my executable application created, it does not work

the file setup.py :

import sys
from cx_Freeze import setup, Executable

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win64":
    base = "Win64GUI"

setup(  name = "cev",
        version = "0.1",
        description = "My CEV application!",
        options = {"build_exe": build_exe_options},
        executables = [Executable("cev.py", base=base)])
thanks for help
Reply
#2
Please, when you cross-post (e.g. on SO or elsewhere), let us know - you don't want to waste the time of people who want to help you, right?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
use pyinstaller instead.
you can also check youtube video
Reply
#4
but at the internet I read that pyinstaller is only compatible with python 2.7 and not with version 3.X
Reply
#5
I can assure you it works with Python 3.6 since I have used it.
Reply
#6
(Dec-24-2018, 09:41 AM)atlass218 Wrote: pyinstaller is only compatible with python 2.7 and not with version 3.X

Don't know where you read it, but it's not true.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#7
I think I confused it with py2exe
but when I try to install pyinstaller I have this error :


Quote:C:\Users\AHMED\AppData\Local\Programs\Python\Python36>pip install pyinstaller
Collecting pyinstaller
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/pyinstaller/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/pyinstaller/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/pyinstaller/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/pyinstaller/
Reply
#8
try again and if you don't succeed - download wheel from Gohlke.
Actually - this is the direct link.
Then you can install it from the local whl file with pip install PyInstaller‑3.4‑py2.py3‑none‑any.whl
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#9
I downloaded the file "PyInstaller-3.4-py2.py3-none-any.whl", which I put in the folder python36. Then I made in the console command : pip install PyInstaller-3.4-py2.py3-none-any.whl

subsequently I had this error

Quote:C:\Users\AHMED\AppData\Local\Programs\Python\Python36>pip install PyInstaller-3.4-py2.py3-none-any.whl

Processing c:\users\ahmed\appdata\local\programs\python\python36\pyinstaller-3.4-py2.py3-none-any.whl
Collecting altgraph (from PyInstaller==3.4)
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/altgraph/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/altgraph/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/altgraph/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/altgraph/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)': /simple/altgraph/
Could not fetch URL https://pypi.python.org/simple/altgraph/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/altgraph/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)) - skipping
Could not find a version that satisfies the requirement altgraph (from PyInstaller==3.4) (from versions: )
No matching distribution found for altgraph (from PyInstaller==3.4)
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Reply
#10
upgrade your pip. this should fix the ssl error
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send data from a python application to an external application aditya_rajiv 1 2,130 Jul-26-2021, 06:00 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020