Python... which python?

Cannot really find anywhere discussed which version of Python is the default one used by MiaB.
Just installed a new box on a vanilla Ubuntu 18.04.4 machine and it looks like the Python used is v2.7.x. Few related questions…

  • Is this the expected behavior?
  • Does MiaB support Python 3.x?
  • Is there a way to force MiaB to use Python 3.x?

Thanks!

As long as you install a clean Ubuntu server edition 18.04 LTS release, you will be good to go. Keep in mind that some providers have flawed images. But as long as their image is current and good. You’re golden.

Thank you for your reply.

Am actually interested in understanding exactly which version of Python is supposed to be used for few reasons:

  • Python 2.7 is End-Of-Life as of Jan 01, 2020;
  • the version of Boto currently used for S3 backups looks outdated and it looks like it does not correctly support third-party providers (tried both self-hosted MinIO and DigitalOcean Spaces)

Am happy to go ahead, debug it and eventually fix it (and submit a PR), but was just wondering what to expect as Python version(s) used throughout the project.

Sadly, my expertise is in the front end so I can’t really say. But I know it is Python 3-something … I think. Have you looked at the Github repository?

As you can see in the GitHub repo python3 is installed (and used)

1 Like

I guess then my box has some sort of configuration issue because is using Python 2.7 to launch the daemon…

Standalone scripts use the python3 binding explicitly. What gives you the impression that it does not work? See for example: https://github.com/mail-in-a-box/mailinabox/blob/30c2c60f596ab972e496234cb5378c667125a973/setup/migrate.py#L1

My main concern is currently related to the backup.py script: https://github.com/mail-in-a-box/mailinabox/blob/30c2c60f596ab972e496234cb5378c667125a973/management/backup.py#L1

Also a ps aux | grep python shown the whole daemon.py is currently executed via the Python 2.7 binary.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.