You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 24, 2024. It is now read-only.
#Remove the python3 softlink because on Rocky8 its pointing to python3.6 by default. We need python3.9 for gpdb7.
17
-
sudo rm -rf /usr/bin/python3
18
-
sudo ln -s /usr/bin/python3.9 /usr/bin/python3
15
+
pip3 install -r python-dependencies.txt
19
16
20
17
#For all Greenplum Database host systems running RHEL, CentOs or Rocky8, SELinux must either be Disabled or configured to allow unconfined access to Greenplum processes, directories, and the gpadmin user.
Copy file name to clipboardexpand all lines: gpdb-doc/markdown/analytics/pl_python.html.md
+20-20
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ PL/Python is a loadable procedural language. With the Greenplum Database PL/Pyth
18
18
19
19
You can run PL/Python code blocks as anonymous code blocks. See the [DO](../ref_guide/sql_commands/DO.html) command in the *Greenplum Database Reference Guide*.
20
20
21
-
The Greenplum Database PL/Python extension is installed by default with Greenplum Database. `plpython3u` supports developing functions using Python 3.9. The VMware Greenplum installation process installs a Python 3.9 environment to your system as one of its dependencies.
21
+
The Greenplum Database PL/Python extension is installed by default with Greenplum Database. `plpython3u` supports developing functions using Python 3.11. The VMware Greenplum installation process installs a Python 3.11 environment to your system as one of its dependencies.
@@ -34,7 +34,7 @@ The PL/Python language is installed with Greenplum Database. To create and run a
34
34
35
35
For each database that requires its use, register the PL/Python language with the SQL command `CREATE EXTENSION`. Because PL/Python is an untrusted language, only superusers can register PL/Python with a database.
36
36
37
-
Run this command as the `gpadmin` user to register PL/Python with Python 3.9 support:
37
+
Run this command as the `gpadmin` user to register PL/Python with Python 3.11 support:
@@ -45,7 +45,7 @@ PL/Python is registered as an untrusted language.
45
45
### <aid="topic6"></a>Removing PL/Python Support
46
46
47
47
48
-
Run this command as the `gpadmin` user to remove support for PL/Python for Python 3.9:
48
+
Run this command as the `gpadmin` user to remove support for PL/Python for Python 3.11:
49
49
50
50
```
51
51
$ psql -d testdb -c 'DROP EXTENSION plpython3u;'
@@ -332,41 +332,41 @@ A transaction cannot be ended when an explicit subtransaction is active.
332
332
333
333
When you install a Python module for development with PL/Python, the Greenplum Database Python environment must have the module added to it across all segment hosts and mirror hosts in the cluster. When expanding Greenplum Database, you must add the Python modules to the new segment hosts.
334
334
335
-
Greenplum Database provides a collection of data science-related Python modules that you can use to easily develop PL/Python functions in Greenplum. The modules are provided as two `.gppkg` format files that can be installed into a Greenplum cluster using the `gppkg` utility, with one package supporting development with Python 3.9. See [Python Data Science Module Packages](/oss/install_guide/install_python_dsmod.html) for installation instructions and descriptions of the provided modules.
335
+
Greenplum Database provides a collection of data science-related Python modules that you can use to easily develop PL/Python functions in Greenplum. The modules are provided as two `.gppkg` format files that can be installed into a Greenplum cluster using the `gppkg` utility, with one package supporting development with Python 3.11. See [Python Data Science Module Packages](/oss/install_guide/install_python_dsmod.html) for installation instructions and descriptions of the provided modules.
336
336
337
337
To develop with modules that are not part of the Python Data Science Module packages, you can use Greenplum utilities such as `gpssh` and `gpsync` to run commands or copy files to all hosts in the Greenplum cluster. These sections describe how to use those utilities to install and use additional Python modules:
338
338
339
339
-[Verifying the Python Environment](#about_python_env)
340
340
-[Installing Python pip](#topic_yx3_yjq_rt)
341
-
-[Installing Python Packages for Python 3.9](#pip39)
341
+
-[Installing Python Packages for Python 3.11](#pip311)
342
342
-[Building and Installing Python Modules Locally](#topic_j53_5jq_rt)
### <aid="about_python_env"></a>Verifying the Python Environment
346
346
347
-
The plpython3u is built with Python 3.9. To check the Python environment, you can use the `which` command:
347
+
The plpython3u is built with Python 3.11. To check the Python environment, you can use the `which` command:
348
348
349
349
```
350
-
which python3.9
350
+
which python3.11
351
351
```
352
352
353
353
When running shell commands on remote hosts with `gpssh`, specify the `-s` option to source the `greenplum_path.sh` file before running commands on the remote hosts. For example, this command should display the Python installed with Greenplum Database on each host specified in the `gpdb_hosts` file.
354
354
355
355
```
356
-
gpssh -s -f gpdb_hosts which python3.9
356
+
gpssh -s -f gpdb_hosts which python3.11
357
357
```
358
358
359
359
To display the list of currently installed Python modules, run this command.
360
360
361
361
```
362
-
python3.9 -c "help('modules')"
362
+
python3.11 -c "help('modules')"
363
363
```
364
364
365
365
You can optionally run `gpssh` in interactive mode to display Python modules on remote hosts. This example starts `gpssh` in interactive mode and lists the Python modules on the Greenplum Database host `sdw1`.
366
366
367
367
```
368
368
$ gpssh -s -h sdw1
369
-
=> python3.9 -c "help('modules')"
369
+
=> python3.11 -c "help('modules')"
370
370
. . .
371
371
=> exit
372
372
$
@@ -376,24 +376,24 @@ $
376
376
377
377
The Python utility `pip` installs Python packages that contain Python modules and other resource files from versioned archive files.
378
378
379
-
For Python 3.9, use:
379
+
For Python 3.11, use:
380
380
```
381
-
python3.9 -m ensurepip --default-pip
381
+
python3.11 -m ensurepip --default-pip
382
382
```
383
383
384
384
The command runs the `ensurepip` module to bootstrap \(install and configure\) the `pip` utility from the local Python installation.
385
385
386
386
You can run this command to ensure the `pip`, `setuptools` and `wheel` projects are current. Current Python projects ensure that you can install Python packages from source distributions or pre-built distributions \(wheels\).
You can use `gpssh` to run the commands on the Greenplum Database hosts. This example runs `gpssh` in interactive mode to install `pip` on the hosts listed in the file `gpdb_hosts`.
If you use this option, keep in mind that the `PYTHONPATH` environment variable setting is cleared before initializing or executing functions using `plpython3u`. If you want to use modules installed to a custom location, you must configure the paths to those modules using the Greenplum configuration parameter `plpython3.python_path` instead of `PYTHONPATH`. For example:
@@ -512,14 +512,14 @@ If `FAILURE` is returned, these are some possible causes:
512
512
Make sure you get no errors when running command on the segment host as the `gpadmin` user. This `gpssh` command tests importing the numpy module on the segment host `cdw1`.
513
513
514
514
```
515
-
gpssh -s -h cdw1 python3.9 -c "import numpy"
515
+
gpssh -s -h cdw1 python3.11 -c "import numpy"
516
516
```
517
517
518
518
- The `plpython3.python_path` has not been set to the correct location.
519
519
520
520
## <a id="topic11"></a>Examples
521
521
522
-
This PL/Python function example uses Python 3.9 and returns the value of pi using the `numpy` module:
522
+
This PL/Python function example uses Python 3.11 and returns the value of pi using the `numpy` module:
## <aid="topic_pydatascimod3"></a>Data Science Package for Python 3.9 Modules
17
+
## <aid="topic_pydatascimod3"></a>Data Science Package for Python 3.11 Modules
18
18
19
-
The following table lists the modules that are provided in the Data Science Package for Python 3.9.
19
+
The following table lists the modules that are provided in the Data Science Package for Python 3.11.
20
20
21
21
|Module Name|Description/Used For|
22
22
|-----------|--------------------|
@@ -193,14 +193,14 @@ $ sudo yum install tk
193
193
194
194
1. Locate the Data Science Package for Python that you built or downloaded.
195
195
196
-
The file name format of the package is `DataSciencePython<pythonversion>-gp7-rhel<n>-x86_64.gppkg`. For example: `DataSciencePython3.9-3.0.0-gp7-rhel8_x86_64.gppkg`.
196
+
The file name format of the package is `DataSciencePython<pythonversion>-<data-science-bundle-version>-gp7-rhel<n>-x86_64.gppkg`. For example: `DataSciencePython3.11-3.0.0-gp7-rhel8_x86_64.gppkg`.
197
197
198
198
2. Copy the package to the Greenplum Database coordinator host.
199
199
3. Follow the instructions in [Verifying the Greenplum Database Software Download](../install_guide/verify_sw.html) to verify the integrity of the *Greenplum Procedural Languages Python Data Science Package* software.
200
200
4. Use the `gppkg` command to install the package. For example:
`gppkg` installs the Data Science Package for Python modules on all nodes in your Greenplum Database cluster. The command also updates the `PYTHONPATH`, `PATH`, and `LD_LIBRARY_PATH` environment variables in your `greenplum_path.sh` file.
@@ -216,7 +216,7 @@ $ sudo yum install tk
216
216
The Data Science Package for Python modules are installed in the following directory:
Copy file name to clipboardexpand all lines: gpdb-doc/markdown/install_guide/platform-requirements-overview.html.md
+7-6
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,8 @@ Greenplum Database 7 requires the following software packages on RHEL systems. T
46
46
- python3-psycopg2
47
47
- python3-psutil
48
48
- python3-pyyaml
49
-
- python39
49
+
- python3.11
50
+
- python3.11-devel
50
51
- readline
51
52
- rsync
52
53
- sed
@@ -83,12 +84,12 @@ Greenplum Databased 7 supports these Java versions for PL/Java and PXF:
83
84
84
85
#### <aid="topic_xbl_mkx_python"></a>Python
85
86
86
-
Greenplum Database uses the system default `python3` for the Greenplum management utilities, and `python3.9` for the [PL/Python module](../analytics/pl_python.html). For most of the supported OS versions, the system default `python3` is `python3.9`. If you are installing Greenplum Database on Rocky Linux 8, the default `python3` version included is `python3.6`. You may want to unify the `python3` versions to `python3.9` by running the following commands:
87
+
Greenplum Database uses the system default `python3` for the Greenplum management utilities, and `python3.11` for the [PL/Python module](../analytics/pl_python.html). For most of the supported OS versions, the system default `python3` is `python3.9`. If you are installing Greenplum Database on Rocky Linux 8, the default `python3` version included is `python3.6`. You may want to unify the `python3` versions to `python3.11` by running the following commands:
Copy file name to clipboardexpand all lines: gpdb-doc/markdown/ref_guide/modules/postgresml.html.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@ The `postgresml` module provides PostgresML functions for using tens of thousand
6
6
7
7
## <aid="prereqs"></a>Before Registering the `postgresml` Module
8
8
9
-
Before registering the `postgresml` module, you must install the Data Science bundle for Python3.9, add the `pgml` library to the set of libraries the VMware Greenplum server loads at startup, and set the Python virtual environment:
9
+
Before registering the `postgresml` module, you must install the Data Science bundle for Python3.11, add the `pgml` library to the set of libraries the VMware Greenplum server loads at startup, and set the Python virtual environment:
10
10
11
-
1. Install the Data Science bundle for Python 3.9.
11
+
1. Install the Data Science bundle for Python 3.11.
0 commit comments