[ https://issues.apache.org/jira/browse/FLINK-32034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dian Fu closed FLINK-32034. --------------------------- Fix Version/s: 1.18.0 1.17.2 Assignee: Colten Pilgreen Resolution: Fixed Fixed in: - master via 6ee1912e949cf290e5e1e620b1f4bae6552b428b - release-1.17 via dd1dde377f775c43fcd95eed1bae91bf5fcfee2e > Python's DistUtils is deprecated as of 3.10 > ------------------------------------------- > > Key: FLINK-32034 > URL: https://issues.apache.org/jira/browse/FLINK-32034 > Project: Flink > Issue Type: Bug > Components: API / Python > Affects Versions: 1.17.0 > Environment: Kubernetes > Java 11 > Python 3.10.9 > Reporter: Colten Pilgreen > Assignee: Colten Pilgreen > Priority: Minor > Labels: pull-request-available > Fix For: 1.18.0, 1.17.2 > > Attachments: get_site_packages_path_script.py, > get_site_packages_path_script_shortened.py > > > I have recent just went through an upgrade from 1.13 to 1.17, along with that > I upgraded the python version on our Flink Session server. Most everything > that is part of our workflow works, except for Python Dependency Management. > After doing some digging, I found the reason is due to the DeprecationWarning > that is printed when trying to get the site packages path. The script is > GET_SITE_PACKAGES_PATH_SCRIPT and it is executed in the getSitePackagesPath > method in the PythonEnvironmentManagerUtils class. The issue is that the > DeprecationWarning is included into the PYTHONPATH environment variable which > is passed to the beam runner. The deprecation warning breaks Python's ability > to find the site packages due to characters that are not allowed in > filesystem paths. > > Example of the PYTHONPATH environment variable: > PYTHONPATH == <string>:1: DeprecationWarning: The distutils package is > deprecated and slated for removal in Python 3.12. Use setuptools or check PEP > 632 for potential > alternatives:/tmp/python-dist-c63e1464-925c-4289-bb71-c6f50e83186f/python-requirements/lib/python3.10/site-packages > HADOOP_CONF_DIR == /opt/flink/conf -- This message was sent by Atlassian Jira (v8.20.10#820010)