activitywatch: Make build error in MacOs

I am following the instructions of installing from source in MacOs and when i run make build got this error:

python -c "import aw_server; print(aw_server.__version__)"
Traceback (most recent call last):
 File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'aw_server'
make: *** [build] Error 1

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 45 (26 by maintainers)

Commits related to this issue

Most upvoted comments

Uninstalled poetry via curl, reinstalled it via pip3 install poetry, which meant I had the same python version between poetry and the virtualenv (when I ran poetry debug).

AND

I added a 3 to the Makefile python command (i.e. python3 -c "import aw_server; print(aw_server.__version__)")

and it seems to have worked!!

So future humans:

  1. try adding a 3 to the python command first
  2. make sure you install poetry using pip3, and check that when you run poetry debug it seems to be using the same python version
  3. disable poetry’s creating of new environments locally in the project with poetry config virtualenvs.create false --local
  4. if you have an M1 mac, make sure you run the make command with arch -x86_64

Hopefully if you do these things you don’t run into any of these problems! Thanks for your help @ErikBjare !

Maybe we should add the 3 to the Makefile? What do you think Erik?

@ErikBjare I had the same problem - sip wasn’t installing with python 3.8. After I read your previous comment and tried with python 3.7, it worked.

Can we document that somewhere so that future users running make build know they have to use <= python 3.7? What would an appropriate place to document this be?

To fix the building of aw-server-rust you need to install rust nightly and cargo, most easily done with rustup.

What’s wrong with aw-qt is clear in the error message with the following

‘sip<4.20,>=4.19.4’ distribution was not found and is required by PyQt5

You are missing the sip dependency or have the wrong version of it required by pyqt5, or maybe your virtualenv is not set.