exasol / script-languages-release

Release Repository for Script Language Container for user defined functions (UDF's) that can be used in the EXASOL database.
https://docs.exasol.com/database_concepts/udf_scripts.htm
GNU General Public License v3.0
9 stars 5 forks source link

way to upgrade pip-version used for installing python3-packages? #744

Closed djamadeus closed 1 year ago

djamadeus commented 1 year ago

I added the pip install upgrade pip commnd to the Docker-file of the 7.1 flavor trying to be able use the most actual versions of the packages, but it still uses an older pip-version, recognizing only packages-versions from a year ago... is there any way to get the actual ones/upgrade the included pip?

redcatbear commented 1 year ago

@tomuben, this is your area of expertise. Can you answer this question, please.

tomuben commented 1 year ago

Hi @djamadeus, the standard 7.0/7.1 flavors are based on Python 3.6. Newer versions of pip require at least Python 3.7. You can see the limitation running pip3 install upgrade -v. My goal is to update the standard 7.0/7.1 containers to Python 3.7 during the next days (first here on the Github release).

Also, if you are ok with Ubuntu 20.04 and Python 3.8 for your needs, you can use the standard 8.0.0 flavor here; it is fully compatible with an Exasol 7.1 db.

djamadeus commented 1 year ago

@tomuben great to know, thanks!

djamadeus commented 1 year ago

Could I also try to install python 3.10 on this, or is there any specific compatibility reason why you still stick to 3.8?

redcatbear commented 1 year ago

@djamadeus, as @tomuben mentioned, the LC is based on an Ubuntu LTS Linux. We usually only install versions that come pre-shipped with a each version. Manually upgrading is theoretically possible as long as you are prepared to handle any extra dependencies by hand to.

I am not a Python expert, as far as I know Python's dependencies are moderate.

Long story short: if Exasol switches to all new versions, that usually comes with a more uptodate Ubuntu LTS Linux.

djamadeus commented 1 year ago

understood. I'll give it a try anyways, and if it works share it so you can add it to the repo if you like

tomuben commented 1 year ago

@djamadeus , updating the Python version in an SLC is a bit more complicated. You need to build the UDF-client with the correct Python environment (see here ). I would suggest to use the Python3.7-minimal flavor as base; (or alternatively the Python3.8-minimal which is already based on Ubuntu 20.04, but then you need to add the deadsnakes ppa): This builds a Python specific Script-Languages-Container where you don't need to worry about other dependencies (R, Java). On this flavor you can then add your desired Python packages.

As Sebastian commented, for the standard-container we try to avoid adding more dependencies than necessary (for example the deadsnakes ppa), as we have to maintain them for a long time.

redcatbear commented 1 year ago

I am closing the ticket here, because it has no effect on the currently provided standard language containers.