我在google colab上运行apache-beamgcp时遇到了问题。
如果我运行以下单元
!pip install -q apache-beam[gcp]
import apache_beam as beam
with beam.Pipeline() as p:
p | beam.Create([1, 2, 3]) | beam.Map(print)我有一个错误:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/dist-packages/cachetools-4.1.0.dist-info/METADATA'
在第二次运行时:
AttributeError: module 'apache_beam' has no attribute 'pipeline'
几周前,我在colab使用beam,下面的流程运行良好。我试着重新设置到2.21.0和2.20.0 -没有成功。
谢谢!
UPD。有了%%writefile的魔力,它似乎起作用了。看起来问题出在colab导入上
发布于 2020-08-27 04:37:40
尝试升级cachetools:
!pip install cachetools --upgrade它将提示您重新启动实例,因此请继续并重新启动它。
请重试该操作。
https://stackoverflow.com/questions/62522176
复制相似问题