无法在Colab中安装transformers的旧版本

huangapple go评论75阅读模式
英文:

Failure to install old versions of transformers in colab

问题

我最近在Colab中安装Transformer版本2.9.0时遇到了问题。

英文:

I recently had a problem installing Transformer version 2.9.0 in colab.

无法在Colab中安装transformers的旧版本

无法在Colab中安装transformers的旧版本

答案1

得分: 2

Colab 最近升级到 Python 3.9。用户可以在连接到运行时时,通过命令面板上的 "使用回退运行时版本" 命令,临时运行 Python 3.8 运行时(Linux-5.10.147+-x86_64-with-glibc2.29 平台)。有关此问题的跟踪可以在 这里 找到。

英文:

Colab has recently upgraded to Python 3.9. There is a temporary mechanism for users to run Python 3.8 runtime (Linux-5.10.147+-x86_64-with-glibc2.29 platform). This is available from the Command Palette via the "Use fallback runtime version" command when connected to a runtime. The issue can be tracked here.

答案2

得分: 0

正如Scka所说,这个问题是由Colab升级Python引起的。

可以在笔记本上每次使用以下命令安装Python 3.7:

!sudo apt-get install python3.7

!sudo update-alternatives --install /usr/bin/python3 python3 
/usr/bin/python3.7 1

!sudo update-alternatives --config python3

!sudo apt install python3-pip

之后运行:

!python --version

然后运行:

!sudo apt-get install python3.7-distutils
英文:

As Scka said, the problem occurred due to the update of Python by colab.

Python 3.7 can be installed every time on the notebook: with the following commands:

!sudo apt-get install python3.7

!sudo update-alternatives --install /usr/bin/python3 python3
/usr/bin/python3.7 1

!sudo update-alternatives --config python3

!sudo apt install python3-pip

after it

!python --version

then

!sudo apt-get install python3.7-distutils

huangapple
  • 本文由 发表于 2023年3月9日 20:34:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/75684685.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定