There's no straightforward approach for this, because you cannot modify the Dataproc cluster used in the execution within the pipeline. So, if you really need to use the Python plug-in in Native mode, my suggestion is to create a cluster with the py4j library, and then connect it to Data Fusion using the "Remote Hadoop provisioner".

Consider that to use this provisioner, you'll need to create a new Compute Profile, which is only available in Data Fusion Enterprise version.

To install the py4j library in your cluster, you can either create a custom image with the library, provide an initialization actions script to install it, or SSH into the machines and manually execute the pip install command.

Answer from Tlaquetzal on Stack Overflow
🌐
PyPI
pypi.org › project › py4j
py4j · PyPI
pip install py4j Copy PIP instructions · Latest version · Released: Jan 15, 2025 · Enables Python programs to dynamically access arbitrary Java objects · These details have been verified by PyPI · barthe gatorsmile HaejoonLee hyukjinkwon ...
      » pip install py4j
    
Published   Jan 15, 2025
Version   0.10.9.9
🌐
Py4j
py4j.org › download.html
Download Py4J — Py4J
You can download Py4J by using pip, pip install py4j, or easy_install, easy_install py4j.
🌐
Finxter
blog.finxter.com › how-to-install-py4j-in-python
How to Install py4j in Python? – Be on the Right Side of Change
This installs py4j for your default Python installation. The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try "pip3 install py4j" or “python -m pip install py4j“.
🌐
PyPI
pypi.org › project › jtypes.py4j
jtypes.py4j · PyPI
python -m pip install --editable ./jtypes.py4j · Prerequisites: Development is strictly based on tox. To install it run: python -m pip install tox · Copyright (c) 2015-2018, Adam Karpierz · Licensed under the BSD license · http://openso...
      » pip install jtypes.py4j
    
Published   Nov 13, 2018
Version   0.10.8a1
🌐
Anaconda.org
anaconda.org › conda-forge › py4j
py4j - conda-forge | Anaconda.org
Copied fromcf-staging / py4j · Overview · Files 106 · Labels 4 · Badges · Versions · 0.10.9.9 · To install this package, run one of the following: $conda install conda-forge::py4j · Monthly · Downloads Updates · Version · 0.10.9.9 · 0.10.9.8 · 0.10.9.7 ·
🌐
Libraries.io
libraries.io › pypi › py4j
py4j 0.10.9.9 on PyPI - Libraries.io - security & maintenance data for open source software
December 23, 2009 - pip install py4j==0.10.9.9 · Py4J enables Python programs running in a Python interpreter to dynamically access Java objects in a Java Virtual Machine. Methods are called as if the Java objects resided in the Python interpreter and Java collections ...
🌐
GitHub
github.com › py4j › py4j
GitHub - py4j/py4j: Py4J enables Python programs to dynamically access arbitrary Java objects · GitHub
This is the source repository of Py4J projects.
Starred by 1.3K users
Forked by 231 users
Languages   Java 63.1% | Python 34.8%
Find elsewhere
🌐
Google Groups
groups.google.com › a › py4j.org › g › py4j › c › jODZL0cbEzQ
installed py4j on Windows 10 via pip install. Both Python and (Netbeans) Java cannot find it.
To view this discussion on the web visit https://groups.google.com/a/py4j.org/d/msgid/py4j/26f128e2-695e-4057-9563-c56ed7752ca2@py4j.org. ... Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message ... Hi, Can you explain how you added the jar file? I downloaded netbeans, created a project, added the jar file and could find the GatewayServer without any error: ​ Path of the jar file (installed with pip within a virtualenv): ​
🌐
Py4j
py4j.org › contents.html
Py4J Documentation — Py4J
Py4J - A Bridge between Python and Java · index · modules | next | Home | Download | Doc | Blog | github | About » · 1. Installing Py4J · Show Source · Enter search terms or a module, class or function name. 1. Installing Py4J · 1.1. Installing Python 3.8-3.12 ·
🌐
GitHub
github.com › sagarlakshmipathy › Py4J
GitHub - sagarlakshmipathy/Py4J: A Simple Py4J implementation
Optional - Maven (only if you want ... installed, you can proceed with the following steps: Install the package using pip pip install py4j-example...
Author   sagarlakshmipathy
🌐
piwheels
piwheels.org › project › py4j
piwheels - py4j
pip3 install py4j · None · PyPI page · pypi.org/ project/ py4j · Project JSON · piwheels.org/ project/ py4j/ json · Versions · 34 · Files · 28 · Downloads · (all time) loading...
🌐
Py4j
py4j.org › changelog.html
8. Changelog — Py4J
It is now possible to install Py4J from git with pip: pip install git+https://github.com/bartdag/py4j.git
🌐
Funz
funz.github.io › docs › usage_python
Usage: Python
April 13, 2023 - py4j library, to be install with pip install py4j (or see py4j install)
🌐
GitHub
github.com › py4j › py4j › issues › 266
Could not find py4j jar when installed with pip install --user · Issue #266 · py4j/py4j
January 10, 2017 - When py4j is installed using pip install --user py4j (pip version 8.1.1, python 2.7.12, as installed on Ubuntu 16.04), I get the following error: >>> import py4j.java_gateway as jg >&gt...
🌐
GitHub
github.com › py4j › py4j › issues › 521
Could not find py4j jar when installed with pip install on Windows · Issue #521 · py4j/py4j
When py4j is installed using pip install py4j (pip version 22.3.1, Python 3.11, Windows 10), I get the following error: >>> import py4j.java_gateway as jg >>> port = jg.launch_gateway() File "C:\Users\UserName\AppData\Roaming\Python\Pyth...
🌐
USAVPS
usavps.com › home › python › python tutorial: how to install py4j in python?
Python Tutorial: How to Install Py4j in Python? - USAVPS.COM
October 2, 2024 - In this tutorial, we will walk ... install Py4j in Python, ensuring you can seamlessly integrate Java functionality into your Python applications. Before you begin the installation process, ensure you have the following prerequisites: Python installed on your system (preferably version 3.6 or higher). Java Development Kit (JDK) installed (version 8 or higher is recommended). A package manager like pip for installing ...
🌐
Wordpress
py4j.wordpress.com
Py4J Development Blog
Installing Py4J is one pip away: pip install py4j · Again, feel free to contact me or to write a feature request on GitHub! For more information about Py4J: Visit the Py4J website · Visit the Py4J github page · Download Py4J on pypi · Cheers, ...