- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试制作一个从 PDF 中提取图像的脚本,并且我在 Django 项目中制作了一个脚本,并将 pymupdf 添加到了 requests.txt 中。我有一个 Aptfile,其中包含 Mupdf,https://github.com/heroku/heroku-buildpack-apt 作为构建包以及 heroku/python.当尝试将 master 推送到 Heroku 时,推送失败,这是错误。
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 322 bytes | 322.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Apt app detected
remote: -----> Detected Aptfile or Stack changes, flushing cache
remote: -----> Adding custom repositories
remote: -----> Updating apt caches
remote: Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
remote: Get:2 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease [46.3 kB]
remote: Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
remote: Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
remote: Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
remote: Get:6 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/11 amd64 Packages [2,483 B]
remote: Get:7 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 Packages [294 kB]
remote: Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
remote: Get:9 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [817 kB]
remote: Get:10 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [812 kB]
remote: Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,101 kB]
remote: Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,343 kB]
remote: Fetched 17.5 MB in 3s (5,813 kB/s)
remote: Reading package lists...
remote: -----> Fetching .debs for mupdf
remote: Reading package lists...
remote: Building dependency tree...
remote: The following additional packages will be installed:
remote: libopenjp2-7
remote: Suggested packages:
remote: mupdf-tools
remote: The following NEW packages will be installed:
remote: libopenjp2-7 mupdf
remote: 0 upgraded, 2 newly installed, 0 to remove and 46 not upgraded.
remote: Need to get 19.2 MB of archives.
remote: After this operation, 35.3 MB of additional disk space will be used.
remote: Get:1 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 libopenjp2-7 amd64 2.3.0-2build0.18.04.1 [145 kB]
remote: Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 mupdf amd64 1.12.0+ds1-1 [19.0 MB]
remote: Fetched 19.2 MB in 1s (13.5 MB/s)
remote: Download complete and in download only mode
remote: -----> Installing libopenjp2-7_2.3.0-2build0.18.04.1_amd64.deb
remote: -----> Installing mupdf_1.12.0+ds1-1_amd64.deb
remote: -----> Writing profile script
remote: -----> Rewrite package-config files
remote: -----> Python app detected
remote: -----> Need to update SQLite3, clearing cache
remote: -----> Installing python-3.6.10
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: Sqlite3 successfully installed.
remote: -----> Installing requirements with pip
remote: Collecting bs4==0.0.1 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 1))
remote: Downloading https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz
remote: Collecting Django==2.1.11 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 2))
remote: Downloading https://files.pythonhosted.org/packages/8c/49/d5038239995594281478bf209f8d93524ad342d500009a697b27f884668a/Django-2.1.11-py3-none-any.whl (7.3MB)
remote: Collecting django-heroku==0.3.1 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 3))
remote: Downloading https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/django_heroku-0.3.1-py2.py3-none-any.whl
remote: Collecting django-widget-tweaks==1.4.5 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 4))
remote: Downloading https://files.pythonhosted.org/packages/1c/11/a8d3a4d73a09973d62ce381fb73a926707cb1485aa29599f2afc04dee7b4/django_widget_tweaks-1.4.5-py2.py3-none-any.whl
remote: Collecting forex-python==1.5 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/1a/ff/f3f6da21e8fdc6ece355643871749c79a3191fed1cba088cbd0dc597dfee/forex-python-1.5.tar.gz
remote: Collecting gunicorn==19.9.0 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 6))
remote: Downloading https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl (112kB)
remote: Collecting imageio==2.6.1 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 7))
remote: Downloading https://files.pythonhosted.org/packages/1a/de/f7f985018f462ceeffada7f6e609919fbcc934acd9301929cba14bc2c24a/imageio-2.6.1-py3-none-any.whl (3.3MB)
remote: Collecting img2pdf==0.3.3 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 8))
remote: Downloading https://files.pythonhosted.org/packages/e0/c6/7cd14232a1b10bf884c12daf3626afb76c4f60b52ae0eb23ce1519542ae4/img2pdf-0.3.3.tar.gz (80kB)
remote: Collecting imutils==0.5.3 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 9))
remote: Downloading https://files.pythonhosted.org/packages/b5/94/46dcae8c061e28be31bcaa55c560cb30ee9403c9a4bb2659768ec1b9eb7d/imutils-0.5.3.tar.gz
remote: Collecting opencv-python-headless==4.1.2.30 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 10))
remote: Downloading https://files.pythonhosted.org/packages/5d/96/b2824df85d8c5f148125e4fee073a62fde17639502fe67042b212ebfe488/opencv_python_headless-4.1.2.30-cp36-cp36m-manylinux1_x86_64.whl (21.8MB)
remote: Collecting pandas==0.25.3 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 11))
remote: Downloading https://files.pythonhosted.org/packages/52/3f/f6a428599e0d4497e1595030965b5ba455fd8ade6e977e3c819973c4b41d/pandas-0.25.3-cp36-cp36m-manylinux1_x86_64.whl (10.4MB)
remote: Collecting Pillow==6.1.0 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 12))
remote: Downloading https://files.pythonhosted.org/packages/14/41/db6dec65ddbc176a59b89485e8cc136a433ed9c6397b6bfe2cd38412051e/Pillow-6.1.0-cp36-cp36m-manylinux1_x86_64.whl (2.1MB)
remote: Collecting Pygments==2.4.2 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 13))
remote: Downloading https://files.pythonhosted.org/packages/5c/73/1dfa428150e3ccb0fa3e68db406e5be48698f2a979ccbcec795f28f44048/Pygments-2.4.2-py2.py3-none-any.whl (883kB)
remote: Collecting pypandoc==1.4 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 14))
remote: Downloading https://files.pythonhosted.org/packages/71/81/00184643e5a10a456b4118fc12c96780823adb8ed974eb2289f29703b29b/pypandoc-1.4.tar.gz
remote: Collecting PyPDF2==1.26.0 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 15))
remote: Downloading https://files.pythonhosted.org/packages/b4/01/68fcc0d43daf4c6bdbc6b33cc3f77bda531c86b174cac56ef0ffdb96faab/PyPDF2-1.26.0.tar.gz (77kB)
remote: Collecting scikit-image==0.16.2 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/c8/bb/771800366f41d66eef51e4b80515f8ef7edab234a3f244fdce3bafe89b39/scikit_image-0.16.2-cp36-cp36m-manylinux1_x86_64.whl (26.5MB)
remote: Collecting whitenoise==5.0.1 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 17))
remote: Downloading https://files.pythonhosted.org/packages/ae/25/0c8f08c9d3c93192cd286594f1e87b17bab496fb9082c2a69e17051b91fd/whitenoise-5.0.1-py2.py3-none-any.whl
remote: Collecting xlrd==1.2.0 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 18))
remote: Downloading https://files.pythonhosted.org/packages/b0/16/63576a1a001752e34bf8ea62e367997530dc553b689356b9879339cf45a4/xlrd-1.2.0-py2.py3-none-any.whl (103kB)
remote: Collecting zipp==0.6.0 (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 19))
remote: Downloading https://files.pythonhosted.org/packages/74/3d/1ee25a26411ba0401b43c6376d2316a71addcc72ef8690b101b4ea56d76a/zipp-0.6.0-py2.py3-none-any.whl
remote: Collecting python-docx (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 20))
remote: Downloading https://files.pythonhosted.org/packages/e4/83/c66a1934ed5ed8ab1dbb9931f1779079f8bca0f6bbc5793c06c4b5e7d671/python-docx-0.8.10.tar.gz (5.5MB)
remote: Collecting pymupdf (from -r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 21))
remote: Downloading https://files.pythonhosted.org/packages/3d/6a/5b4d4f1964a0802f8f2514fcd1f8d53c7f1e74a55765f99df1cf482bbbe8/PyMuPDF-1.16.10.tar.gz (175kB)
remote: Collecting beautifulsoup4 (from bs4==0.0.1->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 1))
remote: Downloading https://files.pythonhosted.org/packages/cb/a1/c698cf319e9cfed6b17376281bd0efc6bfc8465698f54170ef60a485ab5d/beautifulsoup4-4.8.2-py3-none-any.whl (106kB)
remote: Collecting pytz (from Django==2.1.11->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 2))
remote: Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB)
remote: Collecting dj-database-url>=0.5.0 (from django-heroku==0.3.1->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 3))
remote: Downloading https://files.pythonhosted.org/packages/d4/a6/4b8578c1848690d0c307c7c0596af2077536c9ef2a04d42b00fabaa7e49d/dj_database_url-0.5.0-py2.py3-none-any.whl
remote: Collecting psycopg2 (from django-heroku==0.3.1->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 3))
remote: Downloading https://files.pythonhosted.org/packages/84/d7/6a93c99b5ba4d4d22daa3928b983cec66df4536ca50b22ce5dcac65e4e71/psycopg2-2.8.4.tar.gz (377kB)
remote: Collecting requests (from forex-python==1.5->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
remote: Collecting simplejson (from forex-python==1.5->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/98/87/a7b98aa9256c8843f92878966dc3d8d914c14aad97e2c5ce4798d5743e07/simplejson-3.17.0.tar.gz (83kB)
remote: Collecting numpy (from imageio==2.6.1->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 7))
remote: Downloading https://files.pythonhosted.org/packages/62/20/4d43e141b5bc426ba38274933ef8e76e85c7adea2c321ecf9ebf7421cedf/numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl (20.1MB)
remote: Collecting python-dateutil>=2.6.1 (from pandas==0.25.3->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 11))
remote: Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
remote: Collecting matplotlib!=3.0.0,>=2.0.0 (from scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/7e/07/4b361d6d0f4e08942575f83a11d33f36897e1aae4279046606dd1808778a/matplotlib-3.1.3-cp36-cp36m-manylinux1_x86_64.whl (13.1MB)
remote: Collecting networkx>=2.0 (from scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/41/8f/dd6a8e85946def36e4f2c69c84219af0fa5e832b018c970e92f2ad337e45/networkx-2.4-py3-none-any.whl (1.6MB)
remote: Collecting PyWavelets>=0.4.0 (from scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/59/bb/d2b85265ec9fa3c1922210c9393d4cdf7075cc87cce6fe671d7455f80fbc/PyWavelets-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (4.4MB)
remote: Collecting scipy>=0.19.0 (from scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/dc/29/162476fd44203116e7980cfbd9352eef9db37c49445d1fec35509022f6aa/scipy-1.4.1-cp36-cp36m-manylinux1_x86_64.whl (26.1MB)
remote: Collecting more-itertools (from zipp==0.6.0->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 19))
remote: Downloading https://files.pythonhosted.org/packages/72/96/4297306cc270eef1e3461da034a3bebe7c84eff052326b130824e98fc3fb/more_itertools-8.2.0-py3-none-any.whl (43kB)
remote: Collecting lxml>=2.3.2 (from python-docx->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 20))
remote: Downloading https://files.pythonhosted.org/packages/dd/ba/a0e6866057fc0bbd17192925c1d63a3b85cf522965de9bc02364d08e5b84/lxml-4.5.0-cp36-cp36m-manylinux1_x86_64.whl (5.8MB)
remote: Collecting soupsieve>=1.2 (from beautifulsoup4->bs4==0.0.1->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 1))
remote: Downloading https://files.pythonhosted.org/packages/81/94/03c0f04471fc245d08d0a99f7946ac228ca98da4fa75796c507f61e688c2/soupsieve-1.9.5-py2.py3-none-any.whl
remote: Collecting certifi>=2017.4.17 (from requests->forex-python==1.5->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
remote: Collecting chardet<3.1.0,>=3.0.2 (from requests->forex-python==1.5->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
remote: Collecting idna<2.9,>=2.5 (from requests->forex-python==1.5->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
remote: Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->forex-python==1.5->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/e8/74/6e4f91745020f967d09332bb2b8b9b10090957334692eb88ea4afe91b77f/urllib3-1.25.8-py2.py3-none-any.whl (125kB)
remote: Collecting six>=1.5 (from python-dateutil>=2.6.1->pandas==0.25.3->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 11))
remote: Downloading https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl
remote: Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/5d/bc/1e58593167fade7b544bfe9502a26dc860940a79ab306e651e7f13be68c2/pyparsing-2.4.6-py2.py3-none-any.whl (67kB)
remote: Collecting cycler>=0.10 (from matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
remote: Collecting kiwisolver>=1.0.1 (from matplotlib!=3.0.0,>=2.0.0->scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/f8/a1/5742b56282449b1c0968197f63eae486eca2c35dcd334bab75ad524e0de1/kiwisolver-1.1.0-cp36-cp36m-manylinux1_x86_64.whl (90kB)
remote: Collecting decorator>=4.3.0 (from networkx>=2.0->scikit-image==0.16.2->-r /tmp/build_460e46d9ff4616a54e3ebd7caa495280/requirements.txt (line 16))
remote: Downloading https://files.pythonhosted.org/packages/8f/b7/f329cfdc75f3d28d12c65980e4469e2fa373f1953f5df6e370e84ea2e875/decorator-4.4.1-py2.py3-none-any.whl
remote: Installing collected packages: soupsieve, beautifulsoup4, bs4, pytz, Django, dj-database-url, whitenoise, psycopg2, django-heroku, django-widget-tweaks, certifi, chardet, idna, urllib3, requests, simplejson, forex-python, gunicorn, numpy, Pillow, imageio, img2pdf, imutils, opencv-python-headless, six, python-dateutil, pandas, Pygments, pypandoc, PyPDF2, pyparsing, cycler, kiwisolver, matplotlib, decorator, networkx, PyWavelets, scipy, scikit-image, xlrd, more-itertools, zipp, lxml, python-docx, pymupdf
remote: Running setup.py install for bs4: started
remote: Running setup.py install for bs4: finished with status 'done'
remote: Running setup.py install for psycopg2: started
remote: Running setup.py install for psycopg2: finished with status 'done'
remote: Running setup.py install for simplejson: started
remote: Running setup.py install for simplejson: finished with status 'done'
remote: Running setup.py install for forex-python: started
remote: Running setup.py install for forex-python: finished with status 'done'
remote: Running setup.py install for img2pdf: started
remote: Running setup.py install for img2pdf: finished with status 'done'
remote: Running setup.py install for imutils: started
remote: Running setup.py install for imutils: finished with status 'done'
remote: Running setup.py install for pypandoc: started
remote: Running setup.py install for pypandoc: finished with status 'done'
remote: Running setup.py install for PyPDF2: started
remote: Running setup.py install for PyPDF2: finished with status 'done'
remote: Running setup.py install for python-docx: started
remote: Running setup.py install for python-docx: finished with status 'done'
remote: Running setup.py install for pymupdf: started
remote: Running setup.py install for pymupdf: finished with status 'error'
remote: Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-205xyxft/pymupdf/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-a457z02t-record/install-record.txt --single-version-externally-managed --compile:
remote: running install
remote: running build
remote: running build_py
remote: creating build
remote: creating build/lib.linux-x86_64-3.6
remote: creating build/lib.linux-x86_64-3.6/fitz
remote: copying fitz/__init__.py -> build/lib.linux-x86_64-3.6/fitz
remote: copying fitz/fitz.py -> build/lib.linux-x86_64-3.6/fitz
remote: copying fitz/utils.py -> build/lib.linux-x86_64-3.6/fitz
remote: copying fitz/__main__.py -> build/lib.linux-x86_64-3.6/fitz
remote: running build_ext
remote: building 'fitz._fitz' extension
remote: creating build/temp.linux-x86_64-3.6
remote: creating build/temp.linux-x86_64-3.6/fitz
remote: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/mupdf -I/usr/local/include/mupdf -I/app/.heroku/python/include/python3.6m -c fitz/fitz_wrap.c -o build/temp.linux-x86_64-3.6/fitz/fitz_wrap.o
remote: fitz/fitz_wrap.c:2732:10: fatal error: fitz.h: No such file or directory
remote: #include <fitz.h>
remote: ^~~~~~~~
remote: compilation terminated.
remote: error: command 'gcc' failed with exit status 1
remote:
remote: ----------------------------------------
remote: Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-205xyxft/pymupdf/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-a457z02t-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-205xyxft/pymupdf/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to compare-tool.
remote:
To https://git.heroku.com/compare-tool.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/compare-tool.git'
`
最佳答案
我遇到了与您描述的完全相同的问题。
在此之前,我的 Django Heroku 应用程序使用 PyMuPDF/Fitz 运行良好,没有任何问题。所以我得出的结论是,这个构建失败是一个全新的问题,导致了一些变化。
就我而言,我最近刚刚更新了我的依赖项,其中包括 PyMuPDF。
解决我问题的方法是将 PyMuPDF 锁定在 1.16.0 版本。
pymupdf = "==1.16.0"
我认为截至撰写本文时最新版本是 1.16.1 或 1.16.2。
我不能 100% 确定根本原因,但我怀疑这是因为最新版本的 PyMuPDF 可能不允许向后兼容旧版本的 pip。
在检查我的实时 Heroku dyno 上运行的 pip 版本后,我得到:
“您使用的是 pip 版本 9.0.2,但版本 20.0.2 可用。”
如果您使用默认的 Heroku Python 环境,同样的情况可能也适用于您。
请告诉我们卡住您的 PyMuPDF 版本是否也能解决您的问题!
关于python - 如何在 Heroku Django 上安装 PyMuPDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60150936/
我正在处理一组标记为 160 个组的 173k 点。我想通过合并最接近的(到 9 或 10 个组)来减少组/集群的数量。我搜索过 sklearn 或类似的库,但没有成功。 我猜它只是通过 knn 聚类
我有一个扁平数字列表,这些数字逻辑上以 3 为一组,其中每个三元组是 (number, __ignored, flag[0 or 1]),例如: [7,56,1, 8,0,0, 2,0,0, 6,1,
我正在使用 pipenv 来管理我的包。我想编写一个 python 脚本来调用另一个使用不同虚拟环境(VE)的 python 脚本。 如何运行使用 VE1 的 python 脚本 1 并调用另一个 p
假设我有一个文件 script.py 位于 path = "foo/bar/script.py"。我正在寻找一种在 Python 中通过函数 execute_script() 从我的主要 Python
这听起来像是谜语或笑话,但实际上我还没有找到这个问题的答案。 问题到底是什么? 我想运行 2 个脚本。在第一个脚本中,我调用另一个脚本,但我希望它们继续并行,而不是在两个单独的线程中。主要是我不希望第
我有一个带有 python 2.5.5 的软件。我想发送一个命令,该命令将在 python 2.7.5 中启动一个脚本,然后继续执行该脚本。 我试过用 #!python2.7.5 和http://re
我在 python 命令行(使用 python 2.7)中,并尝试运行 Python 脚本。我的操作系统是 Windows 7。我已将我的目录设置为包含我所有脚本的文件夹,使用: os.chdir("
剧透:部分解决(见最后)。 以下是使用 Python 嵌入的代码示例: #include int main(int argc, char** argv) { Py_SetPythonHome
假设我有以下列表,对应于及时的股票价格: prices = [1, 3, 7, 10, 9, 8, 5, 3, 6, 8, 12, 9, 6, 10, 13, 8, 4, 11] 我想确定以下总体上最
所以我试图在选择某个单选按钮时更改此框架的背景。 我的框架位于一个类中,并且单选按钮的功能位于该类之外。 (这样我就可以在所有其他框架上调用它们。) 问题是每当我选择单选按钮时都会出现以下错误: co
我正在尝试将字符串与 python 中的正则表达式进行比较,如下所示, #!/usr/bin/env python3 import re str1 = "Expecting property name
考虑以下原型(prototype) Boost.Python 模块,该模块从单独的 C++ 头文件中引入类“D”。 /* file: a/b.cpp */ BOOST_PYTHON_MODULE(c)
如何编写一个程序来“识别函数调用的行号?” python 检查模块提供了定位行号的选项,但是, def di(): return inspect.currentframe().f_back.f_l
我已经使用 macports 安装了 Python 2.7,并且由于我的 $PATH 变量,这就是我输入 $ python 时得到的变量。然而,virtualenv 默认使用 Python 2.6,除
我只想问如何加快 python 上的 re.search 速度。 我有一个很长的字符串行,长度为 176861(即带有一些符号的字母数字字符),我使用此函数测试了该行以进行研究: def getExe
list1= [u'%app%%General%%Council%', u'%people%', u'%people%%Regional%%Council%%Mandate%', u'%ppp%%Ge
这个问题在这里已经有了答案: Is it Pythonic to use list comprehensions for just side effects? (7 个答案) 关闭 4 个月前。 告
我想用 Python 将两个列表组合成一个列表,方法如下: a = [1,1,1,2,2,2,3,3,3,3] b= ["Sun", "is", "bright", "June","and" ,"Ju
我正在运行带有最新 Boost 发行版 (1.55.0) 的 Mac OS X 10.8.4 (Darwin 12.4.0)。我正在按照说明 here构建包含在我的发行版中的教程 Boost-Pyth
学习 Python,我正在尝试制作一个没有任何第 3 方库的网络抓取工具,这样过程对我来说并没有简化,而且我知道我在做什么。我浏览了一些在线资源,但所有这些都让我对某些事情感到困惑。 html 看起来
我是一名优秀的程序员,十分优秀!