【问题标题】:FileNotFoundError: [Errno 2] No such file or directory: 'gifsicle': 'gifsicle' in Google ColabFileNotFoundError: [Errno 2] No such file or directory: 'gifsicle': 'gifsicle' in Google Colab
【发布时间】:2021-03-26 13:13:56
【问题描述】:

我正在尝试使用 pygifsicle 的优化功能优化 gif,在 Colab 环境中工作。我使用了!pip install pygifscile,它成功安装了pygifsicle-1.0.1。但是,无论我使用import pygifsicle 还是from pygifsicle import optimize,我仍然会收到错误消息:

FileNotFoundError: [Errno 2] No such file or directory: 'gifsicle': 'gifsicle'

我知道 gifsicle 是 pygifsicle 的先决条件,如何在 Colab 中安装它?

【问题讨论】:

    标签: python optimization pip google-colaboratory gifsicle


    【解决方案1】:

    解决方案:

    意识到 Colab 运行的是 Ubuntu 命令,我只是在我的单元格:from pygifsicle import optimize 之后运行了!sudo apt-get install gifsicle,现在可以毫无问题地调用优化函数!

    【讨论】:

      猜你喜欢
      • 2022-01-24
      • 1970-01-01
      • 2018-03-07
      • 1970-01-01
      • 1970-01-01
      • 2012-08-25
      • 2019-10-14
      • 1970-01-01
      • 2023-03-06
      相关资源
      最近更新 更多