googleapis / googleapis/python-aiplatform
Installing python-aiplatform && KFP on the same enviroment breaks KFP
- Lenguaje dominante
- Python
- Estrellas
- 905
- Forks
- 465
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 44
Descripción
#### Environment details
- OS type and version: Ubuntu 22.04
- Python version: 3.11.3
- pip version: 23.1.2
- `google-cloud-aiplatform` version: 1.36.0
#### Steps to reproduce
1. Create a new venv
2. `python -m pip install kfp==2.4.0
3. `python -m pip install google-cloud-aiplatform==1.36.0`
#### Code example
```python
import kfp
```
#### Stack trace
```
Traceback (most recent call last):
File "/home/davidnet/Documents/personal/aip_problem/main.py", line 1, in
import kfp
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/__init__.py", line 40, in
from kfp import components # noqa: keep unused import
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/components/__init__.py", line 27, in
from kfp.components.load_yaml_utilities import load_component_from_file
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/components/load_yaml_utilities.py", line 18, in
from kfp.dsl import structures
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/__init__.py", line 232, in
from kfp.dsl.component_decorator import component
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/component_decorator.py", line 19, in
from kfp.dsl import component_factory
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/component_factory.py", line 27, in
from kfp.dsl import container_component_class
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/container_component_class.py", line 18, in
from kfp.dsl import base_component
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/base_component.py", line 19, in
from kfp.dsl import pipeline_task
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/pipeline_task.py", line 26, in
from kfp.dsl import structures
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/structures.py", line 34, in
from kfp.pipeline_spec import pipeline_spec_pb2
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/pipeline_spec/pipeline_spec_pb2.py", line 38, in
_descriptor.EnumValueDescriptor(
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/google/protobuf/descriptor.py", line 780, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
```
The only way to solve it is to set the enviroment variable, should this be also filled in kfp?
Thanks
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.