Hi, 你可以执行 pip install -r flink-python/dev/dev-requirements.txt 安装开发环境所需要的依赖
Best, Xingbo 张 兴博 <xingbozh...@outlook.com> 于2022年6月15日周三 10:20写道: > 您好: > 我是一名学习使用pyflink的用户,我想在ubuntu20.04上开发pyflink,但是在运行代码的时候,报错为: > > Traceback (most recent call last): > File "/root/tttt.py", line 6, in <module> > s_env = StreamExecutionEnvironment.get_execution_environment() > File > "/usr/local/lib/python3.8/dist-packages/pyflink/datastream/stream_execution_environment.py", > line 805, in get_execution_environment > return StreamExecutionEnvironment(j_stream_exection_environment) > File > "/usr/local/lib/python3.8/dist-packages/pyflink/datastream/stream_execution_environment.py", > line 62, in __init__ > self._open() > File > "/usr/local/lib/python3.8/dist-packages/pyflink/datastream/stream_execution_environment.py", > line 973, in _open > startup_loopback_server() > File > "/usr/local/lib/python3.8/dist-packages/pyflink/datastream/stream_execution_environment.py", > line 963, in startup_loopback_server > from pyflink.fn_execution.beam.beam_worker_pool_service import \ > File > "/usr/local/lib/python3.8/dist-packages/pyflink/fn_execution/beam/beam_worker_pool_service.py", > line 31, in <module> > from apache_beam.options.pipeline_options import DebugOptions > File "/usr/local/lib/python3.8/dist-packages/apache_beam/__init__.py", > line 96, in <module> > from apache_beam import io > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/io/__init__.py", line > 23, in <module> > from apache_beam.io.avroio import * > File "/usr/local/lib/python3.8/dist-packages/apache_beam/io/avroio.py", > line 63, in <module> > from apache_beam.io import filebasedsink > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/io/filebasedsink.py", > line 36, in <module> > from apache_beam.io import iobase > File "/usr/local/lib/python3.8/dist-packages/apache_beam/io/iobase.py", > line 57, in <module> > from apache_beam.transforms import Impulse > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/transforms/__init__.py", > line 25, in <module> > from apache_beam.transforms.external import * > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/transforms/external.py", > line 45, in <module> > from apache_beam.runners import pipeline_context > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/runners/pipeline_context.py", > line 51, in <module> > from apache_beam.transforms import environments > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/transforms/environments.py", > line 54, in <module> > from apache_beam.runners.portability.sdk_container_builder import > SdkContainerImageBuilder > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/runners/portability/sdk_container_builder.py", > line 44, in <module> > from apache_beam.internal.gcp.auth import get_service_credentials > File > "/usr/local/lib/python3.8/dist-packages/apache_beam/internal/gcp/auth.py", > line 28, in <module> > from oauth2client.client import GoogleCredentials > File "/usr/local/lib/python3.8/dist-packages/oauth2client/client.py", > line 39, in <module> > from oauth2client import transport > File "/usr/local/lib/python3.8/dist-packages/oauth2client/transport.py", > line 17, in <module> > import httplib2 > ModuleNotFoundError: No module named 'httplib2' > > 通过查询发现在python新版中,httplib2已经不用了?采用的名字是http.client? > 我的python版本为3.8.10,jdk为openjdk 11.0.15(另一台为java 1.8) > 我想知道这是什么原因造成的呢?怎么能解决这个问题呢? > > 感谢您在百忙之中解答我的问题,万分感谢~! > > 发送自 Windows 11 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用 > >