How to create .exe file for this application after making few changes in application

Hi I installed Activity Watch in Centos 7 from source after few changes made in application build is generated successfully. But im unable to generate .exe file from application. Can anyone please help on this how to generate .exe file.

What procedure you’re following to make the .exe file?

I made some changes in UI and generated build after dist folder is created. When im trying to create .EXE file from main.py using pyinstaller build is generated but not able to see any exe client file to install it in windows.

[[email protected] aw_server]# ls
__about__.py  api.py  config.py  exceptions.py  __init__.py  log.py  __main__.py  main.py  __pycache__  rest.py  server.py  static
[[email protected] aw_server]# pwd
/usr/local/activitywatch/aw-server/aw_server

[[email protected] aw_server]# /root/.local/bin/pyinstaller main.py
42 INFO: PyInstaller: 3.6
42 INFO: Python: 3.6.8
43 INFO: Platform: Linux-3.10.0-957.27.2.el7.x86_64-x86_64-with-centos-7.8.2003-Core
44 INFO: wrote /usr/local/activitywatch/aw-server/aw_server/main.spec
46 INFO: UPX is not available.
47 INFO: Extending PYTHONPATH with paths
['/usr/local/activitywatch/aw-server',
 '/usr/local/activitywatch/aw-server/aw_server']
48 INFO: checking Analysis
48 INFO: Building Analysis because Analysis-00.toc is non existent
48 INFO: Initializing module dependency graph...
49 INFO: Caching module graph hooks...
56 INFO: Analyzing base_library.zip ...
3114 INFO: Caching module dependency graph...
3190 INFO: running Analysis Analysis-00.toc
3211 INFO: Analyzing /usr/local/activitywatch/aw-server/aw_server/main.py
3217 INFO: Processing module hooks...
3217 INFO: Loading module hook "hook-encodings.py"...
3286 INFO: Loading module hook "hook-pydoc.py"...
3287 INFO: Loading module hook "hook-xml.py"...
3547 INFO: Looking for ctypes DLLs
3547 INFO: Analyzing run-time hooks ...
3554 INFO: Looking for dynamic libraries
4055 INFO: Looking for eggs
4055 INFO: Using Python library /lib64/libpython3.6m.so.1.0
4059 INFO: Warnings written to /usr/local/activitywatch/aw-server/aw_server/build/main/warn-main.txt
4088 INFO: Graph cross-reference written to /usr/local/activitywatch/aw-server/aw_server/build/main/xref-main.html
4094 INFO: checking PYZ
4094 INFO: Building PYZ because PYZ-00.toc is non existent
4094 INFO: Building PYZ (ZlibArchive) /usr/local/activitywatch/aw-server/aw_server/build/main/PYZ-00.pyz
4478 INFO: Building PYZ (ZlibArchive) /usr/local/activitywatch/aw-server/aw_server/build/main/PYZ-00.pyz completed successfully.
4480 INFO: checking PKG
4481 INFO: Building PKG because PKG-00.toc is non existent
4481 INFO: Building PKG (CArchive) PKG-00.pkg
4496 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
4497 INFO: Bootloader /root/.local/lib/python3.6/site-packages/PyInstaller/bootloader/Linux-64bit/run
4497 INFO: checking EXE
4497 INFO: Building EXE because EXE-00.toc is non existent
4497 INFO: Building EXE from EXE-00.toc
4498 INFO: Appending archive to ELF section in EXE /usr/local/activitywatch/aw-server/aw_server/build/main/main
4505 INFO: Building EXE from EXE-00.toc completed successfully.
4506 INFO: checking COLLECT
4506 INFO: Building COLLECT because COLLECT-00.toc is non existent
4506 INFO: Building COLLECT COLLECT-00.toc
4534 INFO: Building COLLECT COLLECT-00.toc completed successfully.
[[email protected] aw_server]# ls
__about__.py  api.py  build  config.py  dist  exceptions.py  __init__.py  log.py  __main__.py  main.py  main.spec  __pycache__  rest.py  server.py  static
[[email protected] aw_server]# cd dist/
[[email protected] dist]# ls
main
[[email protected] dist]# cd main/
[[email protected] main]# ls
base_library.zip                                 libgssapi_krb5.so.2                              _pickle.cpython-36m-x86_64-linux-gnu.so
binascii.cpython-36m-x86_64-linux-gnu.so         libk5crypto.so.3                                 _posixsubprocess.cpython-36m-x86_64-linux-gnu.so
_bisect.cpython-36m-x86_64-linux-gnu.so          libkeyutils.so.1                                 pyexpat.cpython-36m-x86_64-linux-gnu.so
_blake2.cpython-36m-x86_64-linux-gnu.so          libkrb5.so.3                                     _random.cpython-36m-x86_64-linux-gnu.so
_bz2.cpython-36m-x86_64-linux-gnu.so             libkrb5support.so.0                              readline.cpython-36m-x86_64-linux-gnu.so
_codecs_cn.cpython-36m-x86_64-linux-gnu.so       liblzma.so.5                                     resource.cpython-36m-x86_64-linux-gnu.so
_codecs_hk.cpython-36m-x86_64-linux-gnu.so       libpcre.so.1                                     select.cpython-36m-x86_64-linux-gnu.so
_codecs_iso2022.cpython-36m-x86_64-linux-gnu.so  libpython3.6m.so.1.0                             _sha1.cpython-36m-x86_64-linux-gnu.so
_codecs_jp.cpython-36m-x86_64-linux-gnu.so       libreadline.so.6                                 _sha256.cpython-36m-x86_64-linux-gnu.so
_codecs_kr.cpython-36m-x86_64-linux-gnu.so       libselinux.so.1                                  _sha3.cpython-36m-x86_64-linux-gnu.so
_codecs_tw.cpython-36m-x86_64-linux-gnu.so       libssl.so.10                                     _sha512.cpython-36m-x86_64-linux-gnu.so
_datetime.cpython-36m-x86_64-linux-gnu.so        libtinfo.so.5                                    _socket.cpython-36m-x86_64-linux-gnu.so
grp.cpython-36m-x86_64-linux-gnu.so              libz.so.1                                        _ssl.cpython-36m-x86_64-linux-gnu.so
_hashlib.cpython-36m-x86_64-linux-gnu.so         _lzma.cpython-36m-x86_64-linux-gnu.so            _struct.cpython-36m-x86_64-linux-gnu.so
_heapq.cpython-36m-x86_64-linux-gnu.so           main                                             termios.cpython-36m-x86_64-linux-gnu.so
libbz2.so.1                                      math.cpython-36m-x86_64-linux-gnu.so             unicodedata.cpython-36m-x86_64-linux-gnu.so
libcom_err.so.2                                  _md5.cpython-36m-x86_64-linux-gnu.so             zlib.cpython-36m-x86_64-linux-gnu.so
libcrypto.so.10                                  _multibytecodec.cpython-36m-x86_64-linux-gnu.so
libexpat.so.1                                    _opcode.cpython-36m-x86_64-linux-gnu.so
[[email protected] main]# cd ..
[[email protected] dist]#

In your example you run pyinstaller straight at the main.py file which will make the name of the executable be just main. There might also be more issues than that which I’m unaware of because the recommended way is to run “make package” which as you can see in the Makefile runs the following “pyinstaller aw-server.spec --clean --noconfirm”.
The aw-server.spec file sets the name, includes all necessary files for both the server and web-ui etc so you really should use that to make things work properly.

Hi i did the same but getting aw_datastore errors please find below

[[email protected] activitywatch]# make package
pip install 'setuptools<45.0.0'  # workaround for https://github.com/pypa/setuptools/issues/1963#issuecomment-573675633
Requirement already satisfied (use --upgrade to upgrade): setuptools<45.0.0 in /usr/lib/python2.7/site-packages
You are using pip version 8.1.2, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
mkdir -p dist/activitywatch
make --directory=aw-watcher-afk package
make[1]: Entering directory `/usr/local/activitywatch/aw-watcher-afk'
pyinstaller aw-watcher-afk.spec --clean --noconfirm
33 INFO: PyInstaller: 3.6
33 INFO: Python: 2.7.5
33 INFO: Platform: Linux-3.10.0-957.27.2.el7.x86_64-x86_64-with-centos-7.8.2003-Core
38 INFO: UPX is not available.
38 INFO: Removing temporary files and cleaning cache in /root/.cache/pyinstaller
40 INFO: Extending PYTHONPATH with paths
['/usr/local/activitywatch/aw-watcher-afk']
40 INFO: checking Analysis
40 INFO: Building Analysis because Analysis-00.toc is non existent
40 INFO: Initializing module dependency graph...
42 INFO: Caching module graph hooks...
48 INFO: Caching module dependency graph...
61 INFO: running Analysis Analysis-00.toc
78 INFO: Analyzing aw_watcher_afk/__main__.py
1412 INFO: Analyzing hidden import 'Xlib.keysymdef.miscellany'
1412 ERROR: Hidden import 'Xlib.keysymdef.miscellany' not found
1412 INFO: Analyzing hidden import 'Xlib.keysymdef.latin1'
1412 ERROR: Hidden import 'Xlib.keysymdef.latin1' not found
1412 INFO: Analyzing hidden import 'Xlib.keysymdef.latin2'
1413 ERROR: Hidden import 'Xlib.keysymdef.latin2' not found
1413 INFO: Analyzing hidden import 'Xlib.keysymdef.latin3'
1413 ERROR: Hidden import 'Xlib.keysymdef.latin3' not found
1414 INFO: Analyzing hidden import 'Xlib.keysymdef.latin4'
1414 ERROR: Hidden import 'Xlib.keysymdef.latin4' not found
1414 INFO: Analyzing hidden import 'Xlib.keysymdef.greek'
1414 ERROR: Hidden import 'Xlib.keysymdef.greek' not found
1414 INFO: Analyzing hidden import 'Xlib.support.unix_connect'
1415 ERROR: Hidden import 'Xlib.support.unix_connect' not found
1415 INFO: Analyzing hidden import 'Xlib.ext.shape'
1415 ERROR: Hidden import 'Xlib.ext.shape' not found
1415 INFO: Analyzing hidden import 'Xlib.ext.xinerama'
1415 ERROR: Hidden import 'Xlib.ext.xinerama' not found
1415 INFO: Analyzing hidden import 'Xlib.ext.composite'
1416 ERROR: Hidden import 'Xlib.ext.composite' not found
1416 INFO: Analyzing hidden import 'Xlib.ext.randr'
1416 ERROR: Hidden import 'Xlib.ext.randr' not found
1416 INFO: Analyzing hidden import 'Xlib.ext.xfixes'
1416 ERROR: Hidden import 'Xlib.ext.xfixes' not found
1417 INFO: Analyzing hidden import 'Xlib.ext.security'
1417 ERROR: Hidden import 'Xlib.ext.security' not found
1417 INFO: Analyzing hidden import 'Xlib.ext.xinput'
1417 ERROR: Hidden import 'Xlib.ext.xinput' not found
1417 INFO: Processing module hooks...
1418 INFO: Loading module hook "hook-encodings.py"...
1892 INFO: Looking for ctypes DLLs
1892 INFO: Analyzing run-time hooks ...
1896 INFO: Looking for dynamic libraries
2326 INFO: Looking for eggs
2326 INFO: Using Python library /lib64/libpython2.7.so.1.0
2329 INFO: Warnings written to /usr/local/activitywatch/aw-watcher-afk/build/aw-watcher-afk/warn-aw-watcher-afk.txt
2341 INFO: Graph cross-reference written to /usr/local/activitywatch/aw-watcher-afk/build/aw-watcher-afk/xref-aw-watcher-afk.html
2374 INFO: checking PYZ
2374 INFO: Building PYZ because PYZ-00.toc is non existent
2374 INFO: Building PYZ (ZlibArchive) /usr/local/activitywatch/aw-watcher-afk/build/aw-watcher-afk/PYZ-00.pyz
2532 INFO: Building PYZ (ZlibArchive) /usr/local/activitywatch/aw-watcher-afk/build/aw-watcher-afk/PYZ-00.pyz completed successfully.
2558 INFO: checking PKG
2558 INFO: Building PKG because PKG-00.toc is non existent
2558 INFO: Building PKG (CArchive) PKG-00.pkg
2576 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
2579 INFO: Bootloader /usr/lib/python2.7/site-packages/PyInstaller/bootloader/Linux-64bit/run
2579 INFO: checking EXE
2579 INFO: Building EXE because EXE-00.toc is non existent
2579 INFO: Building EXE from EXE-00.toc
2579 INFO: Appending archive to ELF section in EXE /usr/local/activitywatch/aw-watcher-afk/build/aw-watcher-afk/aw-watcher-afk
2586 INFO: Building EXE from EXE-00.toc completed successfully.
2589 INFO: checking COLLECT
2589 INFO: Building COLLECT because COLLECT-00.toc is non existent
On your own risk, you can use the option `--noconfirm` to get rid of this question.
2589 INFO: Removing dir /usr/local/activitywatch/aw-watcher-afk/dist/aw-watcher-afk
2593 INFO: Building COLLECT COLLECT-00.toc
2615 INFO: Building COLLECT COLLECT-00.toc completed successfully.
make[1]: Leaving directory `/usr/local/activitywatch/aw-watcher-afk'
cp -r aw-watcher-afk/dist/aw-watcher-afk dist/activitywatch
make --directory=aw-watcher-window package
make[1]: Entering directory `/usr/local/activitywatch/aw-watcher-window'
pyinstaller aw-watcher-window.spec --clean --noconfirm
37 INFO: PyInstaller: 3.6
37 INFO: Python: 2.7.5
37 INFO: Platform: Linux-3.10.0-957.27.2.el7.x86_64-x86_64-with-centos-7.8.2003-Core
42 INFO: UPX is not available.
42 INFO: Removing temporary files and cleaning cache in /root/.cache/pyinstaller
44 INFO: Extending PYTHONPATH with paths
['/usr/local/activitywatch/aw-watcher-window']
44 INFO: checking Analysis
44 INFO: Building Analysis because Analysis-00.toc is non existent
44 INFO: Initializing module dependency graph...
47 INFO: Caching module graph hooks...
52 INFO: Caching module dependency graph...
64 INFO: running Analysis Analysis-00.toc
82 INFO: Analyzing aw_watcher_window/__main__.py
129 INFO: Processing module hooks...
129 INFO: Loading module hook "hook-encodings.py"...
1769 INFO: Looking for ctypes DLLs
1769 INFO: Analyzing run-time hooks ...
1773 INFO: Looking for dynamic libraries
2202 INFO: Looking for eggs
2203 INFO: Using Python library /lib64/libpython2.7.so.1.0
2205 INFO: Warnings written to /usr/local/activitywatch/aw-watcher-window/build/aw-watcher-window/warn-aw-watcher-window.txt
2217 INFO: Graph cross-reference written to /usr/local/activitywatch/aw-watcher-window/build/aw-watcher-window/xref-aw-watcher-window.html
2249 INFO: Appending 'datas' from .spec
2250 INFO: checking PYZ
2250 INFO: Building PYZ because PYZ-00.toc is non existent
2250 INFO: Building PYZ (ZlibArchive) /usr/local/activitywatch/aw-watcher-window/build/aw-watcher-window/PYZ-00.pyz
2399 INFO: Building PYZ (ZlibArchive) /usr/local/activitywatch/aw-watcher-window/build/aw-watcher-window/PYZ-00.pyz completed successfully.
2426 INFO: checking PKG
2426 INFO: Building PKG because PKG-00.toc is non existent
2426 INFO: Building PKG (CArchive) PKG-00.pkg
2442 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
2444 INFO: Bootloader /usr/lib/python2.7/site-packages/PyInstaller/bootloader/Linux-64bit/run
2445 INFO: checking EXE
2445 INFO: Building EXE because EXE-00.toc is non existent
2445 INFO: Building EXE from EXE-00.toc
2445 INFO: Appending archive to ELF section in EXE /usr/local/activitywatch/aw-watcher-window/build/aw-watcher-window/aw-watcher-window
2451 INFO: Building EXE from EXE-00.toc completed successfully.
2455 INFO: checking COLLECT
2455 INFO: Building COLLECT because COLLECT-00.toc is non existent
On your own risk, you can use the option `--noconfirm` to get rid of this question.
2455 INFO: Removing dir /usr/local/activitywatch/aw-watcher-window/dist/aw-watcher-window
2459 INFO: Building COLLECT COLLECT-00.toc
2482 INFO: Building COLLECT COLLECT-00.toc completed successfully.
make[1]: Leaving directory `/usr/local/activitywatch/aw-watcher-window'
cp -r aw-watcher-window/dist/aw-watcher-window dist/activitywatch
make --directory=aw-server package
make[1]: Entering directory `/usr/local/activitywatch/aw-server'
python -m aw_server.__about__
Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib64/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/activitywatch/aw-server/aw_server/__init__.py", line 8, in <module>
    from .server import create_app
  File "/usr/local/activitywatch/aw-server/aw_server/server.py", line 8, in <module>
    import aw_datastore
ModuleNotFoundError: No module named 'aw_datastore'
make[1]: *** [package] Error 1
make[1]: Leaving directory `/usr/local/activitywatch/aw-server'
make: *** [package] Error 2
[[email protected] activitywatch]#

Hi After make package dist folder got created but i dont see any .exe file

(venv) [[email protected] dist]# ls
activitywatch  activitywatch-6b00346-linux-x86_64.zip
(venv) [[email protected] dist]#
array.cpython-36m-x86_64-linux-gnu.so            libcrypto.so.10         liblzma.so.5            libXext.so.6
aw-qt                                            libdbus-1.so.3          libmount.so.1           libXfixes.so.3
aw-qt.desktop                                    libdw.so.1              libpango-1.0.so.0       libXinerama.so.1
aw-server                                        libEGL.so.1             libpangocairo-1.0.so.0  libXi.so.6
aw-server-rust                                   libelf.so.1             libpangoft2-1.0.so.0    libxkbcommon.so.0
aw-watcher-afk                                   libepoxy.so.0           libpcre.so.1            libXrandr.so.2
aw-watcher-window                                libexpat.so.1           libpixman-1.so.0        libXrender.so.1
base_library.zip                                 libffi.so.6             libpng15.so.15          libz.so.1
binascii.cpython-36m-x86_64-linux-gnu.so         libfontconfig.so.1      libpython3.6m.so.1.0    _lzma.cpython-36m-x86_64-linux-gnu.so
_bisect.cpython-36m-x86_64-linux-gnu.so          libfreetype.so.6        libQt5Core.so.5         math.cpython-36m-x86_64-linux-gnu.so
_blake2.cpython-36m-x86_64-linux-gnu.so          libfribidi.so.0         libQt5DBus.so.5         _md5.cpython-36m-x86_64-linux-gnu.so
_bz2.cpython-36m-x86_64-linux-gnu.so             libgcc_s.so.1           libQt5Gui.so.5          _multibytecodec.cpython-36m-x86_64-linux-gnu.so
_codecs_cn.cpython-36m-x86_64-linux-gnu.so       libgcrypt.so.11         libQt5Network.so.5      _opcode.cpython-36m-x86_64-linux-gnu.so
_codecs_hk.cpython-36m-x86_64-linux-gnu.so       libgdk-3.so.0           libQt5Svg.so.5          _pickle.cpython-36m-x86_64-linux-gnu.so
_codecs_iso2022.cpython-36m-x86_64-linux-gnu.so  libgdk_pixbuf-2.0.so.0  libQt5Widgets.so.5      _posixsubprocess.cpython-36m-x86_64-linux-gnu.so
_codecs_jp.cpython-36m-x86_64-linux-gnu.so       libgio-2.0.so.0         libQt5XcbQpa.so.5       pyexpat.cpython-36m-x86_64-linux-gnu.so
_codecs_kr.cpython-36m-x86_64-linux-gnu.so       libGLdispatch.so.0      libreadline.so.6        PyQt5
_codecs_tw.cpython-36m-x86_64-linux-gnu.so       libglib-2.0.so.0        libselinux.so.1         _random.cpython-36m-x86_64-linux-gnu.so
_ctypes.cpython-36m-x86_64-linux-gnu.so          libGLX.so.0             libssl.so.10            readline.cpython-36m-x86_64-linux-gnu.so
_datetime.cpython-36m-x86_64-linux-gnu.so        libgmodule-2.0.so.0     libstdc++.so.6          resource.cpython-36m-x86_64-linux-gnu.so
_decimal.cpython-36m-x86_64-linux-gnu.so         libgobject-2.0.so.0     libsystemd.so.0         select.cpython-36m-x86_64-linux-gnu.so
grp.cpython-36m-x86_64-linux-gnu.so              libgpg-error.so.0       libthai.so.0            _sha1.cpython-36m-x86_64-linux-gnu.so
_hashlib.cpython-36m-x86_64-linux-gnu.so         libgraphite2.so.3       libtinfo.so.5           _sha256.cpython-36m-x86_64-linux-gnu.so
_heapq.cpython-36m-x86_64-linux-gnu.so           libgssapi_krb5.so.2     libuuid.so.1            _sha3.cpython-36m-x86_64-linux-gnu.so
_json.cpython-36m-x86_64-linux-gnu.so            libgthread-2.0.so.0     libwayland-client.so.0  _sha512.cpython-36m-x86_64-linux-gnu.so
libatk-1.0.so.0                                  libgtk-3.so.0           libwayland-cursor.so.0  sip.so
libatk-bridge-2.0.so.0                           libharfbuzz.so.0        libwayland-egl.so.1     _socket.cpython-36m-x86_64-linux-gnu.so
libatspi.so.0                                    libicudata.so.56        libX11.so.6             _ssl.cpython-36m-x86_64-linux-gnu.so
libattr.so.1                                     libicui18n.so.56        libX11-xcb.so.1         _struct.cpython-36m-x86_64-linux-gnu.so
libblkid.so.1                                    libicuuc.so.56          libXau.so.6             termios.cpython-36m-x86_64-linux-gnu.so
libbz2.so.1                                      libk5crypto.so.3        libxcb-render.so.0      unicodedata.cpython-36m-x86_64-linux-gnu.so
libcairo-gobject.so.2                            libkeyutils.so.1        libxcb-shm.so.0         zlib.cpython-36m-x86_64-linux-gnu.so
libcairo.so.2                                    libkrb5.so.3            libXcomposite.so.1
libcap.so.2                                      libkrb5support.so.0     libXcursor.so.1
libcom_err.so.2                                  liblz4.so.1             libXdamage.so.1

It’s right there all of them, they are called aw-qt, aw-server, aw-watcher-window and aw-watcher-afk. They don’t end with .exe because only windows applications are supposed to do that and you are building for Linux.

In Linux, “make package” command worked fine. But in Windows it is giving error…

(cgenv) PS C:\Users\Anil Choudhary\Desktop\activitywatch> make package
pip install 'setuptools<45.0.0'  # workaround for https://github.com/pypa/setuptools/issues/1963#issuecomment-573675633
Requirement already satisfied: setuptools<45.0.0 in c:\users\anil choudhary\anaconda3\envs\cgenv\lib\site-packages (44.1.1)
mkdir -p dist/activitywatch
make --directory=aw-watcher-afk package
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-watcher-afk'
pyinstaller aw-watcher-afk.spec --clean --noconfirm
50 INFO: PyInstaller: 3.5
50 INFO: Python: 3.6.10
51 INFO: Platform: Windows-10-10.0.18362-SP0
55 INFO: UPX is not available.
56 INFO: Removing temporary files and cleaning cache in C:\Users\Anil Choudhary\AppData\Roaming\pyinstaller
59 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Anil Choudhary\\Desktop\\activitywatch\\aw-watcher-afk']
62 INFO: checking Analysis
63 INFO: Building Analysis because Analysis-00.toc is non existent
67 INFO: Initializing module dependency graph...
68 INFO: Initializing module graph hooks...
70 INFO: Analyzing base_library.zip ...
5778 INFO: Analyzing hidden import 'Xlib.keysymdef.miscellany'
5779 ERROR: Hidden import 'Xlib.keysymdef.miscellany' not found
5780 INFO: Analyzing hidden import 'Xlib.keysymdef.latin1'
5784 ERROR: Hidden import 'Xlib.keysymdef.latin1' not found
5784 INFO: Analyzing hidden import 'Xlib.keysymdef.latin2'
5786 ERROR: Hidden import 'Xlib.keysymdef.latin2' not found
5786 INFO: Analyzing hidden import 'Xlib.keysymdef.latin3'
5788 ERROR: Hidden import 'Xlib.keysymdef.latin3' not found
5789 INFO: Analyzing hidden import 'Xlib.keysymdef.latin4'
5791 ERROR: Hidden import 'Xlib.keysymdef.latin4' not found
5793 INFO: Analyzing hidden import 'Xlib.keysymdef.greek'
5795 ERROR: Hidden import 'Xlib.keysymdef.greek' not found
5795 INFO: Analyzing hidden import 'Xlib.support.unix_connect'
5797 ERROR: Hidden import 'Xlib.support.unix_connect' not found
5798 INFO: Analyzing hidden import 'Xlib.ext.shape'
5800 ERROR: Hidden import 'Xlib.ext.shape' not found
5801 INFO: Analyzing hidden import 'Xlib.ext.xinerama'
5804 ERROR: Hidden import 'Xlib.ext.xinerama' not found
5804 INFO: Analyzing hidden import 'Xlib.ext.composite'
5806 ERROR: Hidden import 'Xlib.ext.composite' not found
5806 INFO: Analyzing hidden import 'Xlib.ext.randr'
5808 ERROR: Hidden import 'Xlib.ext.randr' not found
5809 INFO: Analyzing hidden import 'Xlib.ext.xfixes'
5815 ERROR: Hidden import 'Xlib.ext.xfixes' not found
5815 INFO: Analyzing hidden import 'Xlib.ext.security'
5818 ERROR: Hidden import 'Xlib.ext.security' not found
5819 INFO: Analyzing hidden import 'Xlib.ext.xinput'
5821 ERROR: Hidden import 'Xlib.ext.xinput' not found
5823 INFO: running Analysis Analysis-00.toc
5827 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\users\anil choudhary\anaconda3\envs\cgenv\python.exe
6344 INFO: Caching module hooks...
6354 INFO: Analyzing aw_watcher_afk\__main__.py
6541 INFO: Processing pre-safe import module hook   win32com
6613 INFO: Processing pre-find module path hook   distutils
7509 INFO: Loading module hooks...
7509 INFO: Loading module hook "hook-appdirs.py"...
7513 INFO: Excluding import 'win32com'
7515 INFO:   Removing import of win32com.shell.shell from module appdirs
7516 INFO:   Removing import of win32com.shell from module appdirs
7516 INFO:   Removing import of win32com.shell.shellcon from module appdirs
7517 INFO: Loading module hook "hook-distutils.py"...
7519 INFO: Loading module hook "hook-encodings.py"...
7659 INFO: Loading module hook "hook-pydoc.py"...
7660 INFO: Loading module hook "hook-pythoncom.py"...
8115 INFO: Loading module hook "hook-pywintypes.py"...
8565 INFO: Loading module hook "hook-win32com.py"...
9633 INFO: Loading module hook "hook-xml.py"...
10098 INFO: Looking for ctypes DLLs
10109 INFO: Analyzing run-time hooks ...
10120 INFO: Looking for dynamic libraries
10356 INFO: Looking for eggs
10356 INFO: Using Python library c:\users\anil choudhary\anaconda3\envs\cgenv\python36.dll
10358 INFO: Found binding redirects:
[]
10369 INFO: Warnings written to C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-afk\build\aw-watcher-afk\warn-aw-watcher-afk.txt
10450 INFO: Graph cross-reference written to C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-afk\build\aw-watcher-afk\xref-aw-watcher-afk.html
10468 INFO: checking PYZ
10469 INFO: Building PYZ because PYZ-00.toc is non existent
10470 INFO: Building PYZ (ZlibArchive) C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-afk\build\aw-watcher-afk\PYZ-00.pyz
11414 INFO: Building PYZ (ZlibArchive) C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-afk\build\aw-watcher-afk\PYZ-00.pyz completed successfully.
11441 INFO: checking PKG
11441 INFO: Building PKG because PKG-00.toc is non existent
11445 INFO: Building PKG (CArchive) PKG-00.pkg
11484 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
11486 INFO: Bootloader c:\users\anil choudhary\anaconda3\envs\cgenv\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
11486 INFO: checking EXE
11489 INFO: Building EXE because EXE-00.toc is non existent
11489 INFO: Building EXE from EXE-00.toc
11490 INFO: Appending archive to EXE C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-afk\build\aw-watcher-afk\aw-watcher-afk.exe
11499 INFO: Building EXE from EXE-00.toc completed successfully.
11508 INFO: checking COLLECT
11508 INFO: Building COLLECT because COLLECT-00.toc is non existent
11512 INFO: Removing dir C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-afk\dist\aw-watcher-afk
11543 INFO: Building COLLECT COLLECT-00.toc
12652 INFO: Building COLLECT COLLECT-00.toc completed successfully.
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-watcher-afk'
cp -r aw-watcher-afk/dist/aw-watcher-afk dist/activitywatch
make --directory=aw-watcher-window package
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-watcher-window'
pyinstaller aw-watcher-window.spec --clean --noconfirm
113 INFO: PyInstaller: 3.5
113 INFO: Python: 3.6.10
116 INFO: Platform: Windows-10-10.0.18362-SP0
123 INFO: UPX is not available.
124 INFO: Removing temporary files and cleaning cache in C:\Users\Anil Choudhary\AppData\Roaming\pyinstaller
156 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Anil Choudhary\\Desktop\\activitywatch\\aw-watcher-window']
158 INFO: checking Analysis
158 INFO: Building Analysis because Analysis-00.toc is non existent
161 INFO: Initializing module dependency graph...
165 INFO: Initializing module graph hooks...
170 INFO: Analyzing base_library.zip ...
6064 INFO: running Analysis Analysis-00.toc
6068 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\users\anil choudhary\anaconda3\envs\cgenv\python.exe
6637 INFO: Caching module hooks...
6648 INFO: Analyzing aw_watcher_window\__main__.py
6910 INFO: Processing pre-safe import module hook   win32com
6981 INFO: Processing pre-find module path hook   distutils
7807 INFO: Loading module hooks...
7808 INFO: Loading module hook "hook-appdirs.py"...
7811 INFO: Excluding import 'win32com'
7814 INFO:   Removing import of win32com.shell.shellcon from module appdirs
7816 INFO:   Removing import of win32com.shell from module appdirs
7816 INFO:   Removing import of win32com.shell.shell from module appdirs
7817 INFO: Loading module hook "hook-distutils.py"...
7820 INFO: Loading module hook "hook-encodings.py"...
7958 INFO: Loading module hook "hook-pydoc.py"...
7960 INFO: Loading module hook "hook-pythoncom.py"...
8415 INFO: Loading module hook "hook-pywintypes.py"...
8901 INFO: Loading module hook "hook-win32com.py"...
9987 INFO: Loading module hook "hook-xml.py"...
10454 INFO: Looking for ctypes DLLs
10462 INFO: Analyzing run-time hooks ...
10475 INFO: Looking for dynamic libraries
10765 INFO: Looking for eggs
10765 INFO: Using Python library c:\users\anil choudhary\anaconda3\envs\cgenv\python36.dll
10767 INFO: Found binding redirects:
[]
10775 INFO: Warnings written to C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-window\build\aw-watcher-window\warn-aw-watcher-window.txt
10856 INFO: Graph cross-reference written to C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-window\build\aw-watcher-window\xref-aw-watcher-window.html
10872 INFO: Appending 'datas' from .spec
10874 INFO: checking PYZ
10875 INFO: Building PYZ because PYZ-00.toc is non existent
10876 INFO: Building PYZ (ZlibArchive) C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-window\build\aw-watcher-window\PYZ-00.pyz
11906 INFO: Building PYZ (ZlibArchive) C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-window\build\aw-watcher-window\PYZ-00.pyz completed successfully.
11924 INFO: checking PKG
11924 INFO: Building PKG because PKG-00.toc is non existent
11925 INFO: Building PKG (CArchive) PKG-00.pkg
11946 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
11948 INFO: Bootloader c:\users\anil choudhary\anaconda3\envs\cgenv\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
11948 INFO: checking EXE
11951 INFO: Building EXE because EXE-00.toc is non existent
11952 INFO: Building EXE from EXE-00.toc
11954 INFO: Appending archive to EXE C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-window\build\aw-watcher-window\aw-watcher-window.exe
11959 INFO: Building EXE from EXE-00.toc completed successfully.
11964 INFO: checking COLLECT
11964 INFO: Building COLLECT because COLLECT-00.toc is non existent
11965 INFO: Removing dir C:\Users\Anil Choudhary\Desktop\activitywatch\aw-watcher-window\dist\aw-watcher-window
11992 INFO: Building COLLECT COLLECT-00.toc
12478 INFO: Building COLLECT COLLECT-00.toc completed successfully.
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-watcher-window'
cp -r aw-watcher-window/dist/aw-watcher-window dist/activitywatch
make --directory=aw-server package
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-server'
python -m aw_server.__about__
WARNING:root:Could not import pymongo, not available as a datastore backend
C:\Users\Anil Choudhary\Anaconda3\envs\cgenv\lib\runpy.py:125: RuntimeWarning: 'aw_server.__about__' found in sys.modules after import of package 'aw_server', but prior to execution of 'aw_server.__about__'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
fatal: Needed a single revision
Set versionline: __version__ = 'v0.9.dev+unknown'
pyinstaller aw-server.spec --clean --noconfirm
122 INFO: PyInstaller: 3.5
122 INFO: Python: 3.6.10
125 INFO: Platform: Windows-10-10.0.18362-SP0
129 INFO: UPX is not available.
129 INFO: Removing temporary files and cleaning cache in C:\Users\Anil Choudhary\AppData\Roaming\pyinstaller
821 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Anil Choudhary\\Desktop\\activitywatch\\aw-server']
823 INFO: checking Analysis
827 INFO: Building Analysis because Analysis-00.toc is non existent
827 INFO: Initializing module dependency graph...
832 INFO: Initializing module graph hooks...
836 INFO: Analyzing base_library.zip ...
6405 INFO: running Analysis Analysis-00.toc
6410 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\users\anil choudhary\anaconda3\envs\cgenv\python.exe
7005 INFO: Caching module hooks...
7015 INFO: Analyzing __main__.py
7456 INFO: Processing pre-find module path hook   distutils
12435 INFO: Processing pre-safe import module hook   win32com
13880 INFO: Processing pre-safe import module hook   six.moves
15646 INFO: Processing pre-safe import module hook   urllib3.packages.six.moves
17697 INFO: Loading module hooks...
17697 INFO: Loading module hook "hook-appdirs.py"...
17702 INFO: Excluding import 'win32com'
17706 INFO:   Removing import of win32com.shell.shellcon from module appdirs
17707 INFO:   Removing import of win32com.shell from module appdirs
17709 INFO:   Removing import of win32com.shell.shell from module appdirs
17709 INFO: Loading module hook "hook-certifi.py"...
17714 INFO: Loading module hook "hook-distutils.py"...
17716 INFO: Loading module hook "hook-encodings.py"...
17862 INFO: Loading module hook "hook-importlib_metadata.py"...
17864 INFO: Loading module hook "hook-jinja2.py"...
17897 INFO: Loading module hook "hook-jsonschema.py"...
17907 INFO: Loading module hook "hook-pkg_resources.py"...
18854 INFO: Loading module hook "hook-pydoc.py"...
18856 INFO: Loading module hook "hook-pythoncom.py"...
19317 INFO: Loading module hook "hook-pytz.py"...
19417 INFO: Loading module hook "hook-pywintypes.py"...
19870 INFO: Loading module hook "hook-sqlite3.py"...
20014 INFO: Loading module hook "hook-sysconfig.py"...
20016 INFO: Loading module hook "hook-win32com.py"...
21091 INFO: Loading module hook "hook-xml.py"...
21280 INFO: Looking for ctypes DLLs
21331 INFO: Analyzing run-time hooks ...
21345 INFO: Including run-time hook 'pyi_rth_pkgres.py'
21348 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
21351 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
21357 INFO: Including run-time hook 'pyi_rth_certifi.py'
21377 INFO: Looking for dynamic libraries
21934 INFO: Looking for eggs
21934 INFO: Using Python library c:\users\anil choudhary\anaconda3\envs\cgenv\python36.dll
21936 INFO: Found binding redirects:
[]
21958 INFO: Warnings written to C:\Users\Anil Choudhary\Desktop\activitywatch\aw-server\build\aw-server\warn-aw-server.txt
22185 INFO: Graph cross-reference written to C:\Users\Anil Choudhary\Desktop\activitywatch\aw-server\build\aw-server\xref-aw-server.html
22271 INFO: Appending 'datas' from .spec
Unable to find "aw_server\static" when adding binary and data files.
Makefile:28: recipe for target 'package' failed
make[1]: *** [package] Error 1
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-server'
Makefile:153: recipe for target 'package' failed
make: *** [package] Error 2

The error indicates you’re missing the web UI (which is placed in aw_server\static by make build ), so you need to run make build first, so that aw-webui is built.

1 Like

I ran command make build but I got this error:

(venv) C:\Users\Anil Choudhary\Desktop\WebDev\activitywatch>make build
if [ -e "aw-core/.git" ]; then \
        echo "Submodules seem to already be initialized, continuing..."; \
else \
        git submodule update --init --recursive; \
fi
Submodules seem to already be initialized, continuing...
make --directory=aw-core build
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/WebDev/activitywatch/aw-core'
poetry install
Installing dependencies from lock file

No dependencies to install or update

  - Installing aw-core (0.4.2)
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/WebDev/activitywatch/aw-core'
make --directory=aw-client build
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/WebDev/activitywatch/aw-client'
poetry install
Installing dependencies from lock file


Package operations: 0 installs, 1 update, 0 removals

  - Updating aw-core (0.4.2 c:\users\anil choudhary\desktop\webdev\activitywatch\aw-core -> 0.4.2 548f4fc)
  - Installing aw-client (0.3.1)
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/WebDev/activitywatch/aw-client'
make --directory=aw-watcher-afk build
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/WebDev/activitywatch/aw-watcher-afk'
poetry install
Installing dependencies from lock file

[ParseVersionError]
Unable to parse "attr: Xlib.__version_string__".
Makefile:4: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/WebDev/activitywatch/aw-watcher-afk'
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 2