初始化 superset 数据库时失败,执行superset db upgrade报错:
(superset) [diyizu@diyizu12 ~]$ superset db upgrade
/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py:18: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.
import cryptography
Traceback (most recent call last):
File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in
from superset.cli import superset
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/superset/init.py", line 21, in
from superset.app import create_app
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/superset/app.py", line 45, in
from superset.security import SupersetSecurityManager
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/superset/security/init.py", line 17, in
from superset.security.manager import SupersetSecurityManager # noqa: F401
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/superset/security/manager.py", line 49, in
from superset.utils.core import DatasourceName, RowLevelSecurityFilterType
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/superset/utils/core.py", line 70, in
from cryptography.hazmat.backends.openssl.x509 import _Certificate
ModuleNotFoundError: No module named 'cryptography.hazmat.backends.openssl.x509'