question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compiling on Windows

See original GitHub issue

Hey Guys,

I am attempting to compile from source on a Windows machine, however, running into some issues. At the moment I am compiling using the following commands:

cd .\aw-watcher-afk\
poetry shell
poetry install
pyinstaller aw-watcher-afk.spec --clean --noconfirm

No errors are prompted and everything appears to build correctly. However, when I try to launch the executable, I get the following error.

Traceback (most recent call last):
  File "aw_watcher_afk\__main__.py", line 3, in <module>
ModuleNotFoundError: No module named 'aw_core'
[21392] Failed to execute script __main__

I have not used MinGW yet, however, my thought behind this was that the make file is now using poetry so I should not need to do make build and make package?

Please note, this is the raw source downloaded from github, no changes made have been made to code.

How does the Activitywatch team build the windows packages? From what I can find in posts, it looks like you compile on Linux but use Wine to emulate a Windows environment?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
the-architechcommented, Mar 26, 2020

I got it to work guys. Looks like spawning a shell within aw-watcher-afk does not work. However, spawning a shell within activitywatch, running poetry install, then going into aw-watcher-afk, running a poetry install there too, and finally running pyinstaller worked for me.

I was able to execute the aw-watcher-afk.exe without issues.

1reaction
xylixcommented, Mar 25, 2020

Did you try to execute the watcher with the virtualenv (so poetry shell) activated?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Walkthrough: Compile a C program on the command line
In the developer command prompt window, enter cd c:\ to change the current working directory to the root of your C: drive. Next,...
Read more >
Four Ways to Compile C for Windows - null program
Four Ways to Compile C for Windows · Mingw-w64 · Visual C++ · Clang · Pelles C · Other Options.
Read more >
How to Compile C Program in Command Prompt - Edureka
STEP 1: Run the command 'gcc -v' to check if you have a compiler installed. If not you need to download a gcc...
Read more >
Compile on Windows - FreeCAD Documentation
Compiling FreeCAD on Windows requires several tools and libraries. Required. A compiler. FreeCAD is tested with Visual Studio (MSVC)—other ...
Read more >
Developing C programs on Windows
Option 1: Using a text editor and the Developer Command Prompt to compile · E: You can list all of the files in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found