1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
| (superset) [xiamu@hadoop202 ~]$ sudo yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel python-setuptools openssl-devel cyrus-sasl-devel openldap-devel
(superset) [xiamu@hadoop202 ~]$ pip install --upgrade setuptools pip -i https://pypi.douban.com/simple/
(superset) [xiamu@hadoop202 ~]$ pip install apache-superset -i https://pypi.douban.com/simple/
(superset) [xiamu@hadoop202 ~]$ superset db upgrade
Traceback (most recent call last): File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in <module> from superset.cli.main import superset File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/__init__.py", line 18, in <module> from flask import current_app, Flask File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/flask/__init__.py", line 14, in <module> from jinja2 import escape File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/__init__.py", line 12, in <module> from .environment import Environment File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/environment.py", line 25, in <module> from .defaults import BLOCK_END_STRING File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/defaults.py", line 3, in <module> from .filters import FILTERS as DEFAULT_FILTERS File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/filters.py", line 13, in <module> from markupsafe import soft_unicode ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/markupsafe/__init__.py)
(superset) [xiamu@hadoop202 superset]$ pip install --force-reinstall MarkupSafe==2.0.1
Traceback (most recent call last): File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in <module> from superset.cli.main import superset File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/__init__.py", line 21, in <module> from superset.app import create_app File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/app.py", line 23, in <module> from superset.initialization import SupersetAppInitializer File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/initialization/__init__.py", line 33, in <module> from superset.extensions import ( File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/extensions/__init__.py", line 116, in <module> celery_app = celery.Celery() File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/celery/local.py", line 509, in __getattr__ module = __import__(self._object_origins[name], None, None, [name]) File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/celery/app/__init__.py", line 5, in <module> from celery import _state File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/celery/_state.py", line 17, in <module> from celery.utils.threads import LocalStack File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/celery/utils/__init__.py", line 19, in <module> from .nodenames import nodename, nodesplit, worker_direct File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/celery/utils/nodenames.py", line 9, in <module> from kombu.entity import Exchange, Queue File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/kombu/entity.py", line 9, in <module> from .serialization import prepare_accept_content File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/kombu/serialization.py", line 456, in <module> for ep, args in entrypoints('kombu.serializers'): File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/kombu/utils/compat.py", line 93, in entrypoints for ep in importlib_metadata.entry_points().get(namespace, []) AttributeError: 'EntryPoints' object has no attribute 'get'
(superset) [xiamu@hadoop202 superset]$ pip install importlib-metadata==4.13.0
Traceback (most recent call last): File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in <module> from superset.cli.main import superset File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/__init__.py", line 21, in <module> from superset.app import create_app File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/app.py", line 23, in <module> from superset.initialization import SupersetAppInitializer File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/initialization/__init__.py", line 51, in <module> from superset.security import SupersetSecurityManager File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/security/__init__.py", line 17, in <module> from superset.security.manager import SupersetSecurityManager File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/security/manager.py", line 68, in <module> from superset.security.guest_token import ( File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/security/guest_token.py", line 18, in <module> from typing import List, Optional, TypedDict, Union ImportError: cannot import name 'TypedDict' from 'typing' (/opt/module/miniconda3/envs/superset/lib/python3.7/typing.py)
卸载Python版本 (superset) [xiamu@hadoop202 superset]$ conda deactivate [xiamu@hadoop202 superset]$ conda remove -n superset --all
[xiamu@hadoop202 superset]$ conda create --name superset python=3.9
https://blog.csdn.net/qq1787546870/article/details/124582727
Traceback (most recent call last): File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in <module> from superset.cli.main import superset File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/__init__.py", line 21, in <module> from superset.app import create_app File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/app.py", line 23, in <module> from superset.initialization import SupersetAppInitializer File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 33, in <module> from superset.extensions import ( File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/extensions/__init__.py", line 32, in <module> from superset.utils.async_query_manager import AsyncQueryManager File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/async_query_manager.py", line 26, in <module> from superset.utils.core import get_user_id File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/core.py", line 106, in <module> from superset.sql_parse import sanitize_clause File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/sql_parse.py", line 67, in <module> re.compile(r"'(''|\\\\|\\|[^'])*'", sqlparse.keywords.FLAGS).match, AttributeError: module 'sqlparse.keywords' has no attribute 'FLAGS' (superset) [xiamu@hadoop202 superset]$ pip install sqlparse=='0.4.3'
(superset) [xiamu@hadoop202 superset]$ superset db upgrade Usage: superset [OPTIONS] COMMAND [ARGS]... Try 'superset --help' for help.
Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory. (superset) [xiamu@hadoop202 superset]$ export FLASK_APP=superset
(superset) [xiamu@hadoop202 superset]$ superset db upgrade -------------------------------------------------------------------------------- WARNING -------------------------------------------------------------------------------- A Default SECRET_KEY was detected, please use superset_config.py to override it. Use a strong complex alphanumeric string and use a tool to help you generate a sufficiently random sequence, ex: openssl rand -base64 42 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Refusing to start due to insecure SECRET_KEY
(superset) [xiamu@hadoop202 superset]$ openssl rand -base64 42 qh1gH4ZwdmLPN09dczEKhqbgE7U1EN8omxbtnSUSvpxeHwTiHqwcTbNc (superset) [xiamu@hadoop202 superset]$ export SECRET_KEY='qh1gH4ZwdmLPN09dczEKhqbgE7U1EN8omxbtnSUSvp xeHwTiHqwcTbNc'
(superset) [xiamu@hadoop202 ~]$ superset db upgrade -------------------------------------------------------------------------------- WARNING -------------------------------------------------------------------------------- A Default SECRET_KEY was detected, please use superset_config.py to override it. Use a strong complex alphanumeric string and use a tool to help you generate a sufficiently random sequence, ex: openssl rand -base64 42 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Refusing to start due to insecure SECRET_KEY
pip install apache-superset==1.4.2
|