【发布时间】:2020-09-04 14:55:40
【问题描述】:
我最近将我的操作系统升级到了 Ubuntu 20.04 LTS。
现在,当我尝试在 Python 中导入像 Numpy 这样的库时,出现以下错误:
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
我尝试安装 libffi 软件包,但无法找到它:
sudo apt-get install libffi
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libffi
【问题讨论】:
-
您可以尝试重新安装
python3-numpy -
参见来自 rubyists 的 stackoverflow.com/q/65000467/12544391,例如将
gem "ffi"添加到Gemfile修复它
标签: python ubuntu ubuntu-20.04