安装pyheif

pytheif不支持windows,需安装linux

sudo apt search libffi
Sorting... Done
Full Text Search... Done
libffi-dev/focal 3.3-4 amd64
  Foreign Function Interface library (development files)

libffi7/focal,now 3.3-4 amd64 [installed,automatic]
  Foreign Function Interface library runtime

那就安装目录下有的两个

sudo apt-get install libffi-dev
 sudo apt-get install libffi7

当安装libde265-dev时有Error

sudo apt-get install libde265-dev

E: Unable to locate package libde265-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libde265-dev

更新apt

 sudo apt-get update

提示

Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8628 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [987 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [183 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [8880 B]
Get:9 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [526 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [75.4 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [528 B]
Get:12 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [653 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [107 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [12.9 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [21.9 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [4948 B]
Get:17 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [540 B]
Get:18 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9136 B]
Get:23 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1344 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [276 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.5 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [569 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [81.6 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [528 B]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [876 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [190 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [19.5 kB]
Get:32 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [24.5 kB]
Get:33 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [6856 B]
Get:34 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [616 B]
Get:35 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [2568 B]
Get:36 http://archive.ubuntu.com/ubuntu focal-backports/main Translation-en [1120 B]
Get:37 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [400 B]
Get:38 http://archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
Get:39 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [6588 B]
Get:40 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [3292 B]
Get:41 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [580 B]
Get:42 http://archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 20.6 MB in 1min 57s (176 kB/s)
Reading package lists... Done

再次install

apt-get install libheif-dev

ok

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libde265-0 libheif1 libx265-179
The following NEW packages will be installed:
  libde265-0 libheif-dev libheif1 libx265-179
0 upgraded, 4 newly installed, 0 to remove and 86 not upgraded.
Need to get 1485 kB of archives.
After this operation, 17.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 libde265-0 amd64 1.0.4-1build1 [239 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 libx265-179 amd64 3.2.1-1build1 [1060 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64 libheif1 amd64 1.6.1-1build1 [164 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64 libheif-dev amd64 1.6.1-1build1 [22.0 kB]
Fetched 1485 kB in 12s (123 kB/s)
Selecting previously unselected package libde265-0:amd64.
(Reading database ... 32259 files and directories currently installed.)
Preparing to unpack .../libde265-0_1.0.4-1build1_amd64.deb ...
Unpacking libde265-0:amd64 (1.0.4-1build1) ...
Selecting previously unselected package libx265-179:amd64.
Preparing to unpack .../libx265-179_3.2.1-1build1_amd64.deb ...
Unpacking libx265-179:amd64 (3.2.1-1build1) ...
Selecting previously unselected package libheif1:amd64.
Preparing to unpack .../libheif1_1.6.1-1build1_amd64.deb ...
Unpacking libheif1:amd64 (1.6.1-1build1) ...
Selecting previously unselected package libheif-dev:amd64.
Preparing to unpack .../libheif-dev_1.6.1-1build1_amd64.deb ...
Unpacking libheif-dev:amd64 (1.6.1-1build1) ...
Setting up libx265-179:amd64 (3.2.1-1build1) ...
Setting up libde265-0:amd64 (1.0.4-1build1) ...
Setting up libheif1:amd64 (1.6.1-1build1) ...
Setting up libheif-dev:amd64 (1.6.1-1build1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

到此python 的pyheif安装成功

参考文献:
https://pypi.org/project/pyheif/
https://blog.csdn.net/qq_38284951/article/details/116533127

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值