superset icon indicating copy to clipboard operation
superset copied to clipboard

Upgrading to python3.6 from python2.7 in superset

Open ChiLunHuang opened this issue 8 years ago • 5 comments

Make sure these boxes are checked before submitting your issue - thank you!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x] I have reproduced the issue with at least the latest released version of superset.
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar.

Superset version

0.25.6 to 0.28

Expected results

To use an easy way to upgrade python version from 2.7 to 3.6 of superset and superset version to 0.28 and keep all old data and information (Dashboard,Charts,Tables) But the command is not working pip install superset -- upgrade superset db upgrade

Actual results

Can not smoothly upgrade the superset version to 0.28

Steps to reproduce

Just as the title said, is there an easy way to upgrade python version from 2.7 to 3.6 of superset and keep all old data and information (Dashboard,Charts,Tables) ?

I use the old version of superset is 0.25.6 and python is 2.7 for now.

And I want to upgrade to 0.28 for superset, but the version 0.28 is not support python2.7.

I found that if use command pip install superset would install at path /usr/local/lib/python2.7/dist-packages and use command pip3 install superset would install on path /usr/local/lib/python3.6/dist-packages.

The old version of superset and data is at path python2.7, but the new one will build at path python3.6.

How can I move the old version of superset and data to new version?

Any help would be appreciated!

ChiLunHuang avatar Oct 31 '18 09:10 ChiLunHuang

Would recommend using some sort of containerization, either something like Docker, or something like Python virtualenvs.

If you're running Superset in production, you should have some sort of build mechanism that can rebuild a new box/instance/vm/... from scratch. The py3.6 install should probably not be done on top of the py2.7 install, but on a new box/instance/vm using the py3.6 build steps.

mistercrunch avatar Oct 31 '18 20:10 mistercrunch

Thanks for your reply. So, If I just move the files under the path in superset of py2.7 to py3.6, it would not be working.

Is there a recommendation for this situation that I do not use any of containerization (just use pip install superset to automatically install at path /usr/local/lib/python2.7/dist-packages ) and want to upgrade and move dashboards, charts, tables to new version of superset.

Any help would be appreciated!

ChiLunHuang avatar Nov 01 '18 01:11 ChiLunHuang

What's the issue with using virtualenv? Personally I always use one except if in a docker / vagrant.

mistercrunch avatar Nov 01 '18 16:11 mistercrunch

Faced similar upgrade path issues. Using docker image and following all upgrade instructions.

Still unresolved at this stage. Could this potentially be related? https://github.com/apache/incubator-superset/issues/6230

jdefrance-stessa avatar Nov 12 '18 22:11 jdefrance-stessa

Finally, I solved the problem by using virtualenv and upgraded to version 0.28.0. There were some strange problems and error shown in the upgrading process, but they would solve by Google. Thanks for @mistercrunch reply.

ChiLunHuang avatar Jan 16 '19 08:01 ChiLunHuang