Closed jahway603 closed 2 years ago
@jahway603 Ensure that you're using poetry > 1.2.0, which is also a requirement of Synapse v1.68.0.
I think the relevant part of the logs here is:
Traceback (most recent call last):
File "/tmp/pip-install-zd_d2f6d/matrix-synapse_a58a0827ff0048ab8f3222aba7debffa/setup.py", line 242, in <module>
from build_rust import *
File "/tmp/pip-install-zd_d2f6d/matrix-synapse_a58a0827ff0048ab8f3222aba7debffa/build_rust.py", line 6, in <module>
from setuptools_rust import Binding, RustExtension
File "/tmp/pip-build-env-3nmbxrav/overlay/lib/python3.9/site-packages/setuptools_rust/__init__.py", line 1, in <module>
from .build import build_rust
File "/tmp/pip-build-env-3nmbxrav/overlay/lib/python3.9/site-packages/setuptools_rust/build.py", line 23, in <module>
from setuptools.command.build import build as CommandBuild # type: ignore[import]
ModuleNotFoundError: No module named 'setuptools.command.build'
Might be possible to avoid this pain if we provided aarch64 wheels too (#13938)
@jahway603 Ensure that you're using poetry > 1.2.0, which is also a requirement of Synapse v1.68.0.
I did install poetry from the Debian package manager, but it still crashed when building the wheels, so no change.
I seem to hit the same error on WSL2 Ubuntu 22.04 with python 3.10.6 and setuptools 65.4.1 as well as poetry 1.2.2
Turns out for some reason I have setuptools installed in 2 places :/ probably the one is from the package manager and is from late 2021 while the newer is from pip. The older one being not compatible
Uninstalling the python3-setuptools package and using https://bootstrap.pypa.io/get-pip.py
to install pip manually fixes this for me. However that doesnt seem to be a great solution :/
Uninstalling the python3-setuptools package and using
https://bootstrap.pypa.io/get-pip.py
to install pip manually fixes this for me. However that doesnt seem to be a great solution :/
If you are trying to just deploy Synapse, make a new virtualenv, activate it, and pip install matrix-synapse[all]
.
If you're developing on Synapse, use poetry
as described here (which will create a virtualenv for you).
@jahway603 I would guess that the version of setuptools being used to install Synapse is too old. What does sudo -u synapse pip3 show setuptools
say?
Edit: again, if you're doing a from-source or from-pypi installation I would strongly recommend isolating it in a virtualenv.
@DMRobertson This is the result:
$ sudo -u synapse pip3 show setuptools
Name: setuptools
Version: 65.4.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License:
Location: /mnt/dietpi_userdata/synapse/.local/lib/python3.9/site-packages
Requires:
Required-by: jsonschema, zope.interface
Unsure if this is relevant, but just tried upgrading to the latest 1.69.0 right now and this failed too.
It's very odd that you get the error
ModuleNotFoundError: No module named 'setuptools.command.build'
because this was introduced in setuptools 62.4.0 (https://github.com/pypa/setuptools/commit/b517cfae6b11c15834aa7aaf439bc45894a238f4), but your system seems to have setuptools 65.x.
I would guess that (as MTRNord says) there are multiple versions of setuptools and python is picking the "wrong" one. (I hate Python packaging.)
What version of setuptools is installed with the System python? (apt show python3-setuptools
maybe? Guessing---not a Debian user.)
Closing this issue as this server was just successfully upgraded to Matrix Synapse version 1.70.1. Thank you all for your help in resolving this and all the great work you do on Matrix Synapse.
this server was just successfully upgraded to Matrix Synapse version 1.70.1.
Does this mean that you/your distro is using the aarch64 wheels?
Description
When attempting to upgrade my Synapse from 1.67.0 to 1.68.0, it fails on "Building wheel for matrix-synapse (pyproject.toml)".
Per the upgrade notes, I'm not using SQLite and I have rustc installed. I checked the rustc version, which was 1.55.0, and have used rustup to upgrade to rustc 1.64.0, which fits the minimum requirement of rustc 1.58.1, but still have the same error before I upgraded rustc.
Steps to reproduce
sudo systemctl stop synapse
sudo -u synapse pip3 install -U matrix-synapse
[this step fails & output attached at bottom of this bug report]sudo systemctl start synapse
Homeserver
omitted, it's an ARM64
Synapse Version
{"server_version":"1.67.0","python_version":"3.9.2"}
Installation Method
pip (from PyPI)
Platform
"bare metal" on DietPi (Debian for ARM architecture, aarch64) using python pip for install/upgrade
Relevant log output
Anything else that would be useful to know?
I've been running this server for a while now and have not encountered any errors like this when upgrading Synapse releases.