Hi bro try to reinstall impacket either by apt-get or by git, I had the same problem two days ago and my solution was to reinstall the impacket package with the pacman installer of Arch Linux (i use arch btw), if that doesn’t work for you I recommend you to clone directly the impacket repository from github.
git clone https://github.com/fortra/impacket
cd impacket/
pip3 install .
If you have any other errors, don’t hesitate to ask.
On Fedora changing the @SECLEVEL=2 to @SECLEVEL=1 /etc/crypto-policies/back-ends/openssl.config lowers the bar in order to make the mssqlclient working again