I solved the problem by installing the bitcoin package again.
I was getting this error message with my script doubleslow-base.py:
Traceback (most recent call last):
File "./doubleslow-base.py", line 136, in <module>
File "/home/valentin/python/doubleslow/doubleslow_module.py", line 301, in ...
Pycoin now supports segwit xpub after this commit. It is able to parse xpub/ypub/zpub and derive addresses. Ledger is still using incorrect prefix for segwit xpub and you may have to convert the xpub to ypub/zpub appropriately