Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to create ubuntu installer of python gui application created using pyQt and tkinter?

I have developed a desktop application using Python (tkinter) and now I want to create my application installable on different versions of Ubuntu and there are many dependencies in this application so how do I create a package/Debian so it can be installed on the system.

I have tried it myself following the steps below:

  1. Created setup.py of the application:


name=

'desktop_App'

,

version=

'1.0'

,

packages=[

'desktop_App'

],

url=

'

http://www.xxxxx.com'

,

license=

'MIT'

,

author=

'John Doe'

,

author_email=

'johndoe@xxxxx.com'

,

description=

'description goes here...'

,

zip_safe=

False


)

  1. create Debian folder:
directories tree 
desktop_App
debian           debian/changelog    debian/compat debian/control debian/rules
setup.py

dch --create


desktop_App (

1.0

) UNRELEASED; urgency=medium
* Initial release. (Closes: 

#XXXXXX)


-- johndoe <johndoe@gmail.com>  Mon, 

5

Oct

2020

15

:

33

:

03


  1. Touch control:
Source: desktop_App
Section: python
Priority: optional
Maintainer: johndoe, <johndoe@gmail.com>
Build-Depends: debhelper (>= 

7

),

Standards-Version: 
3.9.2


Package: desktop_App
Architecture: all
Section: python
Depends: python, ${misc:Depends}, ${python:Depends}
Description: simple application
  1. Touch rules:
#!/usr/bin/make -f %:   dh $@ --with python3 ```

  1. sudo fakeroot dpkg-buildpackage -b

The second thing I have tried is below:

  1. Install stdeb. (pip install stdeb)
  2. Create setup.py
  3. sudo apt-get install python3-stdeb fakeroot python-all
  4. python3 setup.py sdist
  5. sudo python3 setup.py --command-packages=stdeb.command bdist_deb

I don't understand what i'm doing wrong here.

Answers

  • HNJHNJ Member

    pip install pyinstaller

    It has many options, but the simple ones i'm writing here

    (from terminal, command line)

    pyinstaller myscript.py

    It will create a executable for your current platform


Sign In or Register to comment.