我正在使用 OCI 笔记本会话进行模型部署。在环境中克隆 oci-python-sdk。环境:Python [conda 环境:generalmachinelearningforgpusv1]
(/home/datascience/conda/generalmachinelearningforgpusv1) bash-4.2$ oci --version 2.16.1
面临以下错误:
import oci
from oci.data_science import DataScienceClient, DataScienceClientCompositeOperations
from oci.data_science.models import ModelConfigurationDetails
/home/datascience
ERROR:ads:ADS Exception
Traceback (most recent call last):
File "/home/datascience/conda/generalmachinelearningforgpusv1/lib/python3.6/site-
packages/IPython/core/interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-36-f4bbafdb9ab7>", line 8, in <module>
from oci.data_science.models import ModelConfigurationDetails
ImportError: cannot import name 'ModelConfigurationDetails'
ImportError: cannot import name 'ModelConfigurationDetails
enter code here
当我使用python3环境时,它运行良好。我比较了两个 env 中安装的模块,并在 conda env 中安装了左侧。但我需要在 python3 env 中使用Python [conda env:generalmachinelearningforgpusv1] env, bcz 面临其他模块安装的问题。