1、重新安装alipay-sdk-python,卸载pip uninstall alipay-sdk-python 或者在site-packages目录删除相关包文件;
安装到最新版本pip install alipay-sdk-python==3.3.398,如果还有错误,参照2进行;
2、git clone https://github.com/alipay/alipay-sdk-python-all
python setup.py build
python setup.py install