apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.55k stars 13.78k forks source link

ImportError: cannot import name 'superset' #8661

Closed viking714 closed 4 years ago

viking714 commented 4 years ago

ImportError: cannot import name 'superset'

I want to program on windows 10, and I have install the packages need, change the sof link as mklink /J "E:\incubator-superset\superset\static\assets" "E:\incubator-superset\superset\assets".After "fabmanager create-admin --app superset", I create a user.And then I move into the directory "superset/bin", run "python superset db upgrade".At this point I enconter a error as follow: (superSet) E:\Project\incubator-superset\incubator-superset-master\superset\bin>python superset db upgrade 2019-11-26 22:41:42,632:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'> Traceback (most recent call last): File "superset", line 18, in from superset.cli import superset ImportError: cannot import name 'superset'

I debug it ,but still can't find out what's wrong about the problem.Can anyone help to conquer the problem.Thank you very much.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.52. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

shanmukhsista commented 4 years ago

Just curious -> Did you run 'pip install -e .' from the root directory.

viking714 commented 4 years ago

Just curious -> Did you run 'pip install -e .' from the root directory.

yes, I have ran this command already and it's ok.

viking714 commented 4 years ago

Have anyone meet this problem?

shanmukhsista commented 4 years ago

It happened with me once. i just deleted the superset folder within site-packeges folder and re installed superset in development mode.

viking714 commented 4 years ago

It happened with me once. i just deleted the superset folder within site-packeges folder and re installed superset in development mode.

Thank you very much, but I can't find the folder site-packeges and all the program is in superset folder now,maybe the folder structure has been changed.

viking714 commented 4 years ago

The problem has fixd,thank you. It's because I installed the superset before. but after I uninstall the superset, I enconter a new problem when I run "fabmanager create-admin --app superset".

(newSuperSet) E:\Project\incubator-superset\new\incubator-superset-master\superset>fabmanager create-admin --app superset fabmanager is going to be deprecated in 2.2.X, you can use the same commands on the improved 'flask fab ' Username [admin]: joey User first name [admin]: User last name [user]: Email [admin@fab.org]: Password: Repeat for confirmation: Traceback (most recent call last): File "c:\users\vikin\anaconda3\envs\newsuperset\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\vikin\anaconda3\envs\newsuperset\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\vikin\Anaconda3\envs\newSuperSet\Scripts\fabmanager.exe__main.py", line 7, in File "c:\users\vikin\anaconda3\envs\newsuperset\lib\site-packages\flask_appbuilder\console.py", line 417, in cli cli_app() File "c:\users\vikin\anaconda3\envs\newsuperset\lib\site-packages\click\core.py", line 722, in call__ return self.main(args, kwargs) File "c:\users\vikin\anaconda3\envs\newsuperset\lib\site-packages\click\core.py", line 697, in main rv = self.invoke(ctx) File "c:\users\vikin\anaconda3\envs\newsuperset\lib\site-packages\click\core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\vikin\anaconda3\envs\newsuperset\lib\site-packages\click\core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "c:\users\vikin\anaconda3\envs\newsuperset\lib\site-packages\click\core.py", line 535, in invoke return callback(args, **kwargs) File "c:\users\vikin\anaconda3\envs\newsuperset\lib\site-packages\flask_appbuilder\console.py", line 132, in create_admin auth_type.get(_appbuilder.sm.auth_type, "No Auth method") AttributeError: 'NoneType' object has no attribute 'auth_type' Have anyone know this problem?thank you.

Guires commented 4 years ago

Anaconda prompt

Step1:Install - "pip install virtualenv" Step2: Create VM- "py -m venv your_env_name" or "python -m venv your_env_name" or just create environment using conda Step3:Activate -"your_env_name\Scripts\activate" Step4:Downlaod- python-geohash wheel with compitable version from the link:https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-geohash Step5:Install the python-geohash library "pip install python-geohash directory" step6:anaconda prompt -"pip install superset" step7:# Create an admin user (you will be prompted to set username, first and last name before setting a password) by typing this- "fabmanager create-admin --app superset" step8: type -"cd your_env_name/Scripts" Step8:python superset db upgrade Step9:python superset load_examples step10:python superset init step11:python superset run -p 8088 --with-threads --reload --debugger

After installation, you should be able to point your browser to the right hostname:port http://localhost:8088

superset running Screenshot (93)

viking714 commented 4 years ago

Anaconda prompt

Step1:Install - "pip install virtualenv" Step2: Create VM- "py -m venv your_env_name" or "python -m venv your_env_name" or just create environment using conda Step3:Activate -"your_env_name\Scripts\activate" Step4:Downlaod- python-geohash wheel with compitable version from the link:https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-geohash Step5:Install the python-geohash library "pip install python-geohash directory" step6:anaconda prompt -"pip install superset" step7:# Create an admin user (you will be prompted to set username, first and last name before setting a password) by typing this- "fabmanager create-admin --app superset" step8: type -"cd your_env_name/Scripts" Step8:python superset db upgrade Step9:python superset load_examples step10:python superset init step11:python superset run -p 8088 --with-threads --reload --debugger

After installation, you should be able to point your browser to the right hostname:port http://localhost:8088

superset running Screenshot (93)

Thank you very much about your answer,it's a very good answer.Thank you very much again.