Build errors with Python 3.8
I am setting up a local install in Ubuntu Linux 20.04.3, which provides Python 3.8. I have run into two version conflicts which I resolved by updating the requipments.txt file to newer versions.
psycopg2
This error message was given during the pip install -r requirements.txt command:
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
while (interp->next)
This problem is addressed in Issue 854 of the psycopg2 package in early March 2019. The fix was included in release 2.8.4 in October 2019.
I was able to get past this error by updating my copy of requirements.txt to change the psycopg2 version in line 54 from 2.7.3.2 to 2.8.4.
raven
After the requirements installation finished successfully, attempting to start the server led to this error:
File "/usr/local/lib/python3.7/site-packages/raven/base.py", line 691
if transport.async:
^
SyntaxError: invalid syntax
This problem is addressed in Issue 1277 of the raven-python package, and included in release 6.0.0 in February 2017.
I updated my copy of requirements.txt to change the raven version in line 111 from 5.19.0 to 6.10.0 (the latest 6.x version), then reran the install.
After seeing that the raven version was updated to 6.10.0, my local server now starts up successfully. :-)
I would make a commit and pull request for this, but I don't appear to have privs to create a branch, and I don't want to presume to do it on the default branch.
@JohnBrooking fork the repo, create a new branch locally, push your changes to your fork, then make a PR against the main branch to the project.
Interestingly, I see that mjumbewu already committed a change to app-requirements.txt on May 23 for the raven change to 6.10.0, but the requirements.txt file was not similarly changed. (The app-requirements.txt file does not mention psychopg2.)
Interestingly, I see that mjumbewu already committed a change to
app-requirements.txton May 23 for the raven change to 6.10.0, but therequirements.txtfile was not similarly changed. (Theapp-requirements.txtfile does not mention psychopg2.)
I see that that app-requirements.txt now references raven==6.10.0 and does not include psycopg2. @JohnBrooking can you please confirm whether this is still an issue? If not I think we're safe to close this issue.
I'm now successfully running Shareabouts on Python 3.10 (Ubuntu 22.04), so I believe this is no longer an issue. Closing.