{"id":205129,"date":"2025-05-29T09:50:10","date_gmt":"2025-05-29T01:50:10","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205129\/"},"modified":"2025-05-29T09:50:10","modified_gmt":"2025-05-29T01:50:10","slug":"pythoncythonpyav%e6%9e%84%e5%bb%bawheel%e6%96%87%e4%bb%b6%e6%97%b6%e5%a6%82%e4%bd%95%e5%8c%85%e5%90%ab%e7%ac%ac%e4%b8%89%e6%96%b9%e5%8a%a8%e6%80%81%e9%93%be%e6%8e%a5%e5%ba%93%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205129\/","title":{"rendered":"Python+Cython+PyAV\u6784\u5efawheel\u6587\u4ef6\u65f6\u5982\u4f55\u5305\u542b\u7b2c\u4e09\u65b9\u52a8\u6001\u94fe\u63a5\u5e93\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>Python+Cython+PyAV\u6784\u5efawheel\u6587\u4ef6\u65f6\u5982\u4f55\u5305\u542b\u7b2c\u4e09\u65b9\u52a8\u6001\u94fe\u63a5\u5e93\uff1f<\/h1>\n<p>\u4eca\u5929\u7ed9\u5927\u5bb6\u5e26\u6765\u4e86\uff0c\u5176\u4e2d\u6d89\u53ca\u5230\u7684\u77e5\u8bc6\u70b9\u5305\u62ec<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\uff0c\u65e0\u8bba\u4f60\u662f\u5c0f\u767d\u8fd8\u662f\u8001\u624b\uff0c\u90fd\u9002\u5408\u770b\u4e00\u770b\u54e6~\u6709\u597d\u7684\u5efa\u8bae\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u7559\u8a00\uff0c\u82e5\u662f\u770b\u5b8c\u6709\u6240\u6536\u83b7\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u80fd\u591a\u591a\u70b9\u8d5e\u652f\u6301\u5440\uff01\u4e00\u8d77\u52a0\u6cb9\u5b66\u4e60~<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241124\/17324289276742c47ff3d60.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>python + cython + pyav \u5982\u4f55\u6784\u5efa\u4e00\u4e2a\u5305\u542b\u7b2c\u4e09\u65b9\u52a8\u6001\u94fe\u63a5\u5e93\u7684 wheel \u6587\u4ef6\uff1f<\/strong><\/p>\n<p><strong>\u95ee\u9898<\/strong><\/p>\n<p>\u4f7f\u7528 pyav\uff0c\u60f3\u8981\u81ea\u5df1\u6253\u5305\u4e00\u4e2a wheel \u6587\u4ef6\uff0c\u4f46\u662f\u53d1\u73b0\u4e86\u4e00\u4e9b\u95ee\u9898\uff1a<\/p>\n<ol>\n<li>\u8fd9\u4e00\u4e9b\u52a8\u6001\u94fe\u63a5\u5e93\u6ca1\u6709\u88ab\u5305\u542b\u5230 wheel \u6587\u4ef6\u4e2d\uff0c\u5bfc\u81f4\u5b89\u88c5\u540e\u65e0\u6cd5\u4f7f\u7528\u3002<\/li>\n<li>ldd \u4fe1\u606f\u663e\u793a\u627e\u4e0d\u5230 libav \u7b49\u7b2c\u4e09\u65b9\u5e93\u3002<\/li>\n<\/ol>\n<p><strong>\u7b54\u6848<\/strong><\/p>\n<p>\u9700\u8981\u4f7f\u7528 auditwheel\u3001delocate \u8fd9\u6837\u7684\u5de5\u5177\u6765\u5c06\u7b2c\u4e09\u65b9\u5e93\u56fa\u5316\u5230 wheel \u6587\u4ef6\u4e2d\u3002<\/p>\n<p><strong>\u6b65\u9aa4<\/strong><\/p>\n<ol>\n<li><strong>\u6784\u5efa pyav wheel \u6587\u4ef6<\/strong><\/li>\n<\/ol>\n<pre>git clone git@github.com:pyav-org\/pyav\ncd pyav\nsource scripts\/activate.sh\npip install --upgrade -r tests\/requirements.txt\n.\/scripts\/build-deps\nmake\npython setup.py sdist bdist_wheel<\/pre>\n<ol>\n<li><strong>\u4f7f\u7528 auditwheel \u56fa\u5316\u52a8\u6001\u94fe\u63a5\u5e93<\/strong><\/li>\n<\/ol>\n<pre>pip install auditwheel\nauditwheel repair .\/dist\/av-10.0.0-cp310-cp310-linux_x86_64.whl<\/pre>\n<ol>\n<li><strong>\u9a8c\u8bc1\u56fa\u5316\u662f\u5426\u6210\u529f<\/strong><\/li>\n<\/ol>\n<pre>auditwheel show .\/wheelhouse\/av-10.0.0-cp310-cp310-manylinux_2_35_x86_64.whl<\/pre>\n<p>\u5176\u4e2d\uff0cwheelhouse \u76ee\u5f55\u4e0b\u4e3a\u56fa\u5316\u540e\u7684 wheel \u6587\u4ef6\uff0c\u5176\u683c\u5f0f\u4e0e\u539f\u59cb wheel \u6587\u4ef6\u4e0d\u540c\u3002<\/p>\n<p><strong>\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n<ul>\n<li>\u56fa\u5316\u52a8\u6001\u94fe\u63a5\u5e93\u65f6\uff0c\u9700\u8981\u8003\u8651\u5bbf\u4e3b\u673a\u7684\u5404\u79cd\u73af\u5883\uff0c\u4f8b\u5982\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u3001python \u7248\u672c\u7b49\u3002<\/li>\n<li>auditwheel \u4f1a\u4f7f\u7528 pep 600 \u89c4\u8303\u6765\u5904\u7406\u56fa\u5316\u540e\u7684 wheel \u6587\u4ef6\u3002<\/li>\n<li>\u56fa\u5316\u540e\u7684 wheel \u6587\u4ef6\u53ef\u80fd\u53ea\u9002\u7528\u4e8e\u7279\u5b9a\u7684\u5e73\u53f0\u548c\u73af\u5883\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u672c\u6587\u7684\u5168\u90e8\u5185\u5bb9\u4e86\uff0c\u662f\u5426\u6709\u987a\u5229\u5e2e\u52a9\u4f60\u89e3\u51b3\u95ee\u9898\uff1f\u82e5\u662f\u80fd\u7ed9\u4f60\u5e26\u6765\u5b66\u4e60\u4e0a\u7684\u5e2e\u52a9\uff0c\u8bf7\u5927\u5bb6\u591a\u591a\u652f\u6301\uff01\u66f4\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u4e5f\u53ef\u5173\u6ce8\u516c\u4f17\u53f7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python+Cython+Py&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-205129","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=205129"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205129\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}