【问题标题】:Can't Install Pytorch Lightning Flash on Google Colab无法在 Google Colab 上安装 Pytorch Lightning Flash
【发布时间】:2021-11-18 05:43:57
【问题描述】:

Pytorch Lighting Flash 听起来对我很有希望。我正在尝试在https://lightning-flash.readthedocs.io/ 上运行最基本的教程,但我无法让它们运行。

例如,我在https://lightning-flash.readthedocs.io/en/latest/installation.html 使用安装说明在https://lightning-flash.readthedocs.io/en/stable/reference/object_detection.html 运行此对象检测示例。

我尝试了几种安装方法,但没有一种方法有效。例如:

pip install 'lightning-flash[image]'

这似乎没有任何错误。然后我导入模块

import flash
from flash.core.data.utils import download_data
from flash.image import ObjectDetectionData, ObjectDetector

闪光灯下方有一个 reg 曲线,因此看起来好像有问题。当我运行该块时,我会收到这些错误。

ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZN2at6detail10noopDeleteEPv

【问题讨论】:

    标签: pytorch pytorch-lightning


    【解决方案1】:

    Pytorch Lighting Flash 社区的好心人帮助调整了安装命令以使其正常工作。我在这里打开了一个带有详细信息的错误https://github.com/PyTorchLightning/lightning-flash/issues/803

    按此顺序安装这些软件包有效:

    !pip install torch==1.8.1+cu102 -f https://download.pytorch.org/whl/torch_stable.html
    !pip install icevision #==0.9.0a1
    !pip install effdet 
    !pip install lightning-flash[image]
    !pip install git+https://github.com/PyTorchLightning/lightning-flash.git
    !pip install torchtext==0.9.1
    !pip uninstall fastai -y
    #There is a bug in the latest release of icevision. Manually apply the fix.
    !curl https://raw.githubusercontent.com/airctic/icevision/944b47c5694243ba3f3c8c11a6ef56f05fb111eb/icevision/core/record_components.py --output /usr/local/lib/python3.7/dist-packages/icevision/core/record_components.py
    #Restart the kernel
    

    【讨论】:

      猜你喜欢
      • 2019-05-15
      • 2019-08-28
      • 2021-06-23
      • 2020-05-30
      • 2019-06-04
      • 2021-05-30
      • 2021-04-12
      • 2019-01-02
      • 1970-01-01
      相关资源
      最近更新 更多