fix solver detection bug in py3