[英]apache-beam[gcp] issue in google colab
我在 google colab 上運行 apache-beam[gcp] 時遇到問題。
如果我運行以下單元格
!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 進口上
嘗試升級緩存工具:
!pip install cachetools --upgrade
它會提示您重新啟動實例,因此請提前 go 並重新啟動它。
重試操作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.