Friday, October 7, 2022

[SOLVED] Django website deploy error: Failed building wheel for Pillow, Reportlab in cPanel

Issue

I am trying to use xhtml to pdf libray my code is on goddady cpanel. i have tried pip install reportlab pip install xhtml2pdf pip install --pre xhtml2pdf

and no one works

non of these commands works on the cpanel i am very sad for the errors they are not disappering i tried soo many things

only pip install pillow==8.0.0 works

      copying src/reportlab/fonts/zy______.pfb -> build/lib.linux-x86_64-3.7/reportlab/fonts
      running build_ext
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/src
      creating build/temp.linux-x86_64-3.7/src/rl_addons
      creating build/temp.linux-x86_64-3.7/src/rl_addons/rl_accel
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/rl_addons/rl_accel/_rl_accel.c -o build/temp.linux-x86_64-3.7/src/rl_addons/rl_accel/_rl_accel.o
      error: command '/usr/bin/gcc' failed: Permission denied
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for reportlab
  Running setup.py clean for reportlab
Failed to build Pillow reportlab
Installing collected packages: Pillow, oscrypto, lxml, importlib-metadata, html5lib, future, tzlocal, reportlab, cssselect2, click, arabic-reshaper, svglib, pyhanko-certvalidator, pyHanko, xhtml2pdf
  Attempting uninstall: Pillow
    Found existing installation: Pillow 8.0.0
    Uninstalling Pillow-8.0.0:
      Successfully uninstalled Pillow-8.0.0
  Running setup.py install for Pillow ... error
  error: subprocess-exited-with-error

  × Running setup.py install for Pillow did not run successfully.
  │ exit code: 1
  ╰─> [130 lines of output]
      running install
      /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageFile.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageStat.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/WalImageFile.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/PaletteFile.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/BlpImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/_version.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/_binary.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageColor.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageMode.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      running egg_info
      warning: no files found matching '*.c'
      warning: no files found matching '*.h'
      warning: no files found matching '*.sh'
      warning: no files found matching '*.txt'
      warning: no previously-included files found matching '.appveyor.yml'
      warning: no previously-included files found matching '.clang-format'
      warning: no previously-included files found matching '.coveragerc'
      warning: no previously-included files found matching '.editorconfig'
      warning: no previously-included files found matching '.readthedocs.yml'
      warning: no previously-included files found matching 'codecov.yml'
      warning: no previously-included files matching '.git*' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      no previously-included directories found matching '.ci'
      writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
      running build_ext
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/src
      creating build/temp.linux-x86_64-3.7/src
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-uzv1euwl/pillow_7caad568e8504a3c9cd14a3487098422 -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imagingft.c -o build/temp.linux-x86_64-3.7/src/_imagingft.o
      creating build/temp.linux-x86_64-3.7/src/libImaging
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-uzv1euwl/pillow_7caad568e8504a3c9cd14a3487098422 -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imagingmath.c -o build/temp.linux-x86_64-3.7/src/_imagingmath.o
      creating build/temp.linux-x86_64-3.7/src/Tk
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-uzv1euwl/pillow_7caad568e8504a3c9cd14a3487098422 -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/Tk/tkImaging.c -o build/temp.linux-x86_64-3.7/src/Tk/tkImaging.o
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-uzv1euwl/pillow_7caad568e8504a3c9cd14a3487098422 -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imagingmorph.c -o build/temp.linux-x86_64-3.7/src/_imagingmorph.o
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -DHAVE_XCB -DPILLOW_VERSION=\"9.2.0\" -I/usr/include/freetype2 -I/tmp/pip-install-uzv1euwl/pillow_7caad568e8504a3c9cd14a3487098422 -I/usr/include -I/home/udowyxdf/virtualenv((downloader:3.7)) [udowyxdf@server225 downloader]$ pip install xhtml2pdfCollecting xhtml2pdf
  Using cached xhtml2pdf-0.2.8-py3-none-any.whl (256 kB)
Requirement already satisfied: PyPDF3>=1.0.5 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (
from xhtml2pdf) (1.0.6)
Collecting arabic-reshaper>=2.1.0
  Using cached arabic_reshaper-2.1.3-py3-none-any.whl (20 kB)
Collecting Pillow>=8.1.1
  Using cached Pillow-9.2.0.tar.gz (50.0 MB)
  Preparing metadata (setup.py) ... done
Collecting pyhanko-certvalidator>=0.19.5
  Using cached pyhanko_certvalidator-0.19.5-py3-none-any.whl (70 kB)
Collecting html5lib>=1.0.1
  Using cached html5lib-1.1-py2.py3-none-any.whl (112 kB)
Collecting reportlab>=3.5.53
  Using cached reportlab-3.6.11.tar.gz (4.5 MB)
  Preparing metadata (setup.py) ... done
Collecting pyHanko>=0.12.1
  Using cached pyHanko-0.14.0-py3-none-any.whl (355 kB)
Requirement already satisfied: python-bidi>=0.4.2 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packa
ges (from xhtml2pdf) (0.4.2)
Collecting svglib>=1.2.1
  Using cached svglib-1.4.1-py3-none-any.whl
Collecting future
  Using cached future-0.18.2-py3-none-any.whl
Requirement already satisfied: setuptools in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from arabic-reshaper>=2.1.0->xhtml2pdf) (60.2.0)
Requirement already satisfied: webencodings in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from html5lib>=1.0.1->xhtml2pdf) (0.5.1)
Requirement already satisfied: six>=1.9 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (fromhtml5lib>=1.0.1->xhtml2pdf) (1.16.0)
Requirement already satisfied: asn1crypto>=1.5.1 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from pyHanko>=0.12.1->xhtml2pdf) (1.5.1)
Collecting tzlocal>=2.1
  Using cached tzlocal-4.2-py3-none-any.whl (19 kB)
Requirement already satisfied: cryptography>=3.3.1 in /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages (from pyHanko>=0.12.1->xhtml2pdf) (37.0.2)
Requirement already satisfied: pytz>=2020.1 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from pyHanko>=0.12.1->xhtml2pdf) (2022.1)
Requirement already satisfied: qrcode>=6.1 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from pyHanko>=0.12.1->xhtml2pdf) (7.3.1)
Collecting click>=7.1.2
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Requirement already satisfied: pyyaml>=5.3.1 in /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages (from pyHanko>=0.12.1->xhtml2pdf) (6.0)
Requirement already satisfied: requests>=2.24.0 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from pyHanko>=0.12.1->xhtml2pdf) (2.27.1)
Requirement already satisfied: uritools>=3.0.1 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from pyhanko-certvalidator>=0.19.5->xhtml2pdf) (4.0.0)
Collecting oscrypto>=1.1.0
  Using cached oscrypto-1.3.0-py2.py3-none-any.whl (194 kB)
Requirement already satisfied: tqdm in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from PyPDF3>=1.0.5->xhtml2pdf) (4.64.1)
Requirement already satisfied: tinycss2>=0.6.0 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from svglib>=1.2.1->xhtml2pdf) (1.1.1)
Collecting cssselect2>=0.2.0
  Using cached cssselect2-0.7.0-py3-none-any.whl (15 kB)
Collecting lxml
  Using cached lxml-4.9.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (5.6 MB)
Collecting importlib-metadata
  Using cached importlib_metadata-4.12.0-py3-none-any.whl (21 kB)
Requirement already satisfied: cffi>=1.12 in /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages (from cryptography>=3.3.1->pyHanko>=0.12.1->xhtml2pdf) (1.15.0)
Requirement already satisfied: charset-normalizer~=2.0.0 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from requests>=2.24.0->pyHanko>=0.12.1->xhtml2pdf) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from requests>=2.24.0->pyHanko>=0.12.1->xhtml2pdf) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from requests>=2.24.0->pyHanko>=0.12.1->xhtml2pdf) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from requests>=2.24.0->pyHanko>=0.12.1->xhtml2pdf) (2022.5.18.1)
Requirement already satisfied: pytz-deprecation-shim in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from tzlocal>=2.1->pyHanko>=0.12.1->xhtml2pdf) (0.1.0.post0)
Requirement already satisfied: backports.zoneinfo in /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages (from tzlocal>=2.1->pyHanko>=0.12.1->xhtml2pdf) (0.2.1)
Requirement already satisfied: pycparser in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from cffi>=1.12->cryptography>=3.3.1->pyHanko>=0.12.1->xhtml2pdf) (2.21)
Requirement already satisfied: typing-extensions>=3.6.4 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from importlib-metadata->click>=7.1.2->pyHanko>=0.12.1->xhtml2pdf) (4.3.0)
Requirement already satisfied: zipp>=0.5 in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from importlib-metadata->click>=7.1.2->pyHanko>=0.12.1->xhtml2pdf) (3.8.1)
Requirement already satisfied: tzdata in /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages (from pytz-deprecation-shim->tzlocal>=2.1->pyHanko>=0.12.1->xhtml2pdf) (2022.1)
Building wheels for collected packages: Pillow, reportlab
  Building wheel for Pillow (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [127 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.7/PIL.7/PIL
      copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      running egg_info
      warning: no files found matching '*.c'
      warning: no files found matching '*.h'
      warning: no files found matching '*.sh'
      warning: no files found matching '*.txt'
      warning: no previously-included files found matching '.appveyor.yml'
      warning: no previously-included files found matching '.clang-format'
      warning: no previously-included files found matching '.coveragerc'
      warning: no previously-included files found matching '.editorconfig'
      warning: no previously-included files found matching '.readthedocs.yml'
      warning: no previously-included files found matching 'codecov.yml'
      warning: no previously-included files matching '.git*' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      no previously-included directories found matching '.ci'
      writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
      running build_ext
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/src
      creating build/temp.linux-x86_64-3.7/src/Tk
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-o3ldcnqi/pillow_3e1b94e31bbf47bb83efa30b01bd308e -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imagingmath.c -o build/temp.linux-x86_64-3.7/src/_imagingmath.o
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-o3ldcnqi/pillow_3e1b94e31bbf47bb83efa30b01bd308e -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/Tk/tkImaging.c -o build/temp.linux-x86_64-3.7/src/Tk/tkImaging.o

      copying src/reportlab/pdfbase/pdfpattern.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_standard.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_symbol.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_courierboldoblique.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_macexpert.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/pdfform.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/pdfutils.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_helveticaoblique.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_symbol.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_courier.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_timesitalic.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/cidfonts.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_zapfdingbats.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/__init__.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_glyphlist.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/acroform.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_can_cmap_data.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_timesroman.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_courierbold.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_macroman.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_cidfontdata.py -> build/lib.linux-x86_64-3.7/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_pdfdoc.py -> build/lib.linux-      copying src/reportlab/fonts/callig15.afm -> build/lib.linux-x86_64-3.7/reportlab/fonts
      running build_ext
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/src
      creating build/temp.linux-x86_64-3.7/src/rl_addons
      creating build/temp.linux-x86_64-3.7/src/rl_addons/rl_accel
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/rl_addons/rl_accel/_rl_accel.c -o build/temp.linux-x86_64-3.7/src/rl_addons/rl_accel/_rl_accel.o
      error: command '/usr/bin/gcc' failed: Permission denied
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for reportlab
  Running setup.py clean for reportlab
Failed to build Pillow reportlab
Installing collected packages: Pillow, oscrypto, lxml, importlib-metadata, html5lib, future, tzlocal, reportlab, cssselect2, click, arabic-reshaper, svglib, pyhanko-certvalidator, pyHanko, xhtml2pdf
  Attempting uninstall: Pillow
    Found existing installation: Pillow 8.0.0
    Uninstalling Pillow-8.0.0:
      Successfully uninstalled Pillow-8.0.0
  Running setup.py install for Pillow ... error
  error: subprocess-exited-with-error

  × Running setup.py install for Pillow did not run successfully.
  │ exit code: 1
  ╰─> [130 lines of output]
      running install
      /home/udowyxdf/virtualenv/downloader/3.7/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageDraw2.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImagePath.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/BdfFontFile.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImagePalette.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/MspImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/__main__.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageSequence.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/GdImageFile.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageMath.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/GifImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageTk.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/GimpGradientFile.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ExifTags.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/MicImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL7

      copying src/PIL/__init__.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/PdfParser.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/ImageMorph.py -> build/lib.linux-x86_64-3.7/PIL
     ying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
      running egg_info
      warning: no files found matching '*.c'
      warning: no files found matching '*.h'
      warning: no files found matching '*.sh'
      warning: no files found matching '*.txt'
      warning: no previously-included files found matching '.appveyor.yml'
      warning: no previously-included files found matching '.clang-format'
      warning: no previously-included files found matching '.coveragerc'
      warning: no previously-included files found matching '.editorconfig'
      warning: no previously-included files found matching '.readthedocs.yml'
      warning: no previously-included files found matching 'codecov.yml'
      warning: no previously-included files matching '.git*' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      no previously-included directories found matching '.ci'
      writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
      running build_ext
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/src
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-o3ldcnqi/pillow_3e1b94e31bbf47bb83efa30b01bd308e -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imagingft.c -o build/temp.linux-x86_64-3.7/src/_imagingft.o
      creating build/temp.linux-x86_64-3.7/src/Tk
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-o3ldcnqi/pillow_3e1b94e31bbf47bb83efa30b01bd308e -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/Tk/tkImaging.c -o build/temp.linux-x86_64-3.7/src/Tk/tkImaging.o
      creating build/temp.linux-x86_64-3.7/src/libImaging
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -DHAVE_XCB -DPILLOW_VERSION=\"9.2.0\" -I/usr/include/freetype2 -I/tmp/pip-install-o3ldcnqi/pillow_3e1b94e31bbf47bb83efa30b01bd308e -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imaging.c -o build/temp.linux-x86_64-3.7/src/_imaging.o
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-o3ldcnqi/pillow_3e1b94e31bbf47bb83efa30b01bd308e -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imagingmath.c -o build/temp.linux-x86_64-3.7/src/_imagingmath.o
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/freetype2 -I/tmp/pip-install-o3ldcnqi/pillow_3e1b94e31bbf47bb83efa30b01bd308e -I/usr/include -I/home/udowyxdf/virtualenv/downloader/3.7/include -I/opt/alt/python37/include/python3.7m -c src/_imagingmorph.c -o build/temp.linux-x86_64-3.7/src/_imagingmorph.o
      error: command '/usr/bin/gcc' failed: Permission denied
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Rolling back uninstall of Pillow
  Moving to /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages/PIL/
   from /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages/~IL
  Moving to /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages/Pillow-8.0.0.dist-info/
   from /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages/~illow-8.0.0.dist-info
  Moving to /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages/Pillow.libs/
   from /home/udowyxdf/virtualenv/downloader/3.7/lib64/python3.7/site-packages/~illow.libs
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> Pillow

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
((downloader:3.7)) [udowyxdf@server225 downloader]$```


**I am trying to use xhtml to pdf libray my code is on goddady cpanel.**
i have tried 
pip install reportlab
pip install xhtml2pdf
pip install --pre xhtml2pdf

**and no one works**

non of these commands works on the cpanel i am very sad for the errors they are not disappering i tried soo many things

only 
pip install pillow==8.0.0
 works

Solution

I would suggest you try a different Python version. Also, make sure that you are entering into the virtual environment ( if using the Python Selector feature in cPanel ) before running the pip install. If you still find difficulties with the installation of the required modules, I would definitely recommend reaching out to your hosting provider's support team to check this out for you.



Answered By - Bruno Mirchevski
Answer Checked By - Dawn Plyler (WPSolving Volunteer)