Google有用于检测的python示例代码,但在导入这些模块时出现了错误
from google.cloud import automl_v1beta1
from google.cloud.automl_v1beta1.proto import service_pb2上面写着cannot import name automl_v1beta1。我知道这是一个常见的问题,在互联网上有很多解决方案,但到目前为止还没有奏效。我使用Windows 10并在Anaconda环境上运行python2.7。
我试过了,但没什么效果:
conda install -c conda-forge google-cloud-sdk
conda install -c conda-forge google-cloud-storage
python -m pip install google-cloud
pip install google-cloud-automl发布于 2019-04-10 07:55:41
我刚解决了这是个很简单的问题。我使用下面的命令重新安装google-cloud-automl并工作。
pip.exe install google-cloud-automl为什么上次我试过它却不起作用?因为我没有像administrator.那样运行anaconda提示符原因是在安装google-cloud-automl时,它将卸载future这样的不推荐的项目,如下所示:
Found existing installation: futures 3.1.1
DEPRECATION: Uninstalling a distutils installed project (futures) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling futures-3.1.1:
Successfully uninstalled futures-3.1.1只有当我以管理员身份运行命令时,才能成功地删除未来。上次它引发了我没有意识到的身份验证错误,所以重新安装过程停止了。希望它将来能对一些人有所帮助。
发布于 2019-04-10 07:25:40
你可以安装在木星笔记本细胞内的软件包,我希望它将为你工作。

https://stackoverflow.com/questions/55606725
复制相似问题