Hello,
In case anyone else encounters this problem, I ran into it when trying to install the spams library. A workaround for me was directly cloning the git and installing spams as an editable library from my conda environment as follows
git clone https://github.com/getspams/spams-python
cd spams-python
pip install -e .
I'm no expert, but could the problem occur because of broken features of setuptools (see pypa/setuptools#3532) and be solved by providing an explicit version of setuptools in the requirements.txt file?