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
- fix: made sip an explicit dependency (see https://github.com/ActivityWatch/activitywatch/issues/433) — committed to ActivityWatch/aw-qt by ErikBjare 4 years ago
- fix: made sip an explicit dependency (see https://github.com/ActivityWatch/activitywatch/issues/433) — committed to ActivityWatch/aw-qt by ErikBjare 4 years ago
- docs: when building, Python should be 3.6 or 3.7 * with 3.8 it errors because of sip * https://github.com/ActivityWatch/activitywatch/issues/433 — committed to ppessi/docs by ppessi 4 years ago
- change python to python3 May have been what fixed build issue on M1 mac/with poetry https://github.com/ActivityWatch/activitywatch/issues/433#issuecomment-998992792 — committed to michaeljelly/activitywatch by michaeljelly 3 years ago
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:
poetry debug
it seems to be using the same python versionpoetry config virtualenvs.create false --local
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
You are missing the sip dependency or have the wrong version of it required by pyqt5, or maybe your virtualenv is not set.