Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghostscript-python not installed #25

Closed
1 task done
PythonCHB opened this issue Nov 1, 2023 · 5 comments · May be fixed by #27
Closed
1 task done

ghostscript-python not installed #25

PythonCHB opened this issue Nov 1, 2023 · 5 comments · May be fixed by #27
Labels
bug Something isn't working

Comments

@PythonCHB
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

When I try to use camelot to read a pdf, I get:

ModuleNotFoundError: No module named 'ghostscript'

which makes sense, as the ghostscript-python pacakge is not installed.

the recipe depends on ghosscript, but that's jsut the C lib (system), not the Python wrapper. :-(

It doesn't look like there is a conda-forge package for ghostscript-python, so that's the first step to getting this to work.

I have to wonder how anyone uses this package at all?

NOTE: the tests should probably not just import camelot, but also try to read an actual PDF, so you'd know if it actually works.

I'll try to put together a PR ...

tested with a fresh install of jsut camelot-python (py3.12) as well as into an existing python 3.10 environment -- same result.

If I pip install ghostscript after the conda install, it does work, becasue that installs the python wrapper.

Installed packages

(after pip installing ghostscript)

(camelot) chris@Chris-MacBook House % conda list
# packages in environment at /Users/chris/miniconda3/envs/camelot:
#
# Name                    Version                   Build  Channel
aom                       3.6.1                he965462_0    conda-forge
brotli                    1.1.0                h0dc2134_1    conda-forge
brotli-bin                1.1.0                h0dc2134_1    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.20.1               h10d778d_1    conda-forge
ca-certificates           2023.7.22            h8857fd0_0    conda-forge
cairo                     1.18.0               h99e66fa_0    conda-forge
camelot-py                0.10.1             pyhd8ed1ab_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py312h38bf5a0_0    conda-forge
chardet                   5.2.0           py312hb401068_1    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
contourpy                 1.1.1           py312h49ebfd2_1    conda-forge
cryptography              41.0.5          py312h68f415e_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
dav1d                     1.2.1                h0dc2134_0    conda-forge
et_xmlfile                1.1.0              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                hf0c8a7f_1    conda-forge
ffmpeg                    6.0.0           gpl_h789aacd_105    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               h5bb23bf_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.43.1          py312h41838bb_0    conda-forge
freetype                  2.12.1               h60636b9_2    conda-forge
fribidi                   1.0.10               hbcb3906_0    conda-forge
gettext                   0.21.1               h8a4c099_0    conda-forge
ghostscript               0.7                      pypi_0    pypi
gmp                       6.2.1                h2e338ed_0    conda-forge
gnutls                    3.7.8                h207c4f0_0    conda-forge
graphite2                 1.3.13            h2e338ed_1001    conda-forge
harfbuzz                  8.2.1                h7666e2a_0    conda-forge
hdf5                      1.14.2          nompi_hedada53_100    conda-forge
icu                       73.2                 hf5e326d_0    conda-forge
jasper                    4.0.0                h6513c55_2    conda-forge
kiwisolver                1.4.5           py312h49ebfd2_1    conda-forge
krb5                      1.21.2               hb884880_0    conda-forge
lame                      3.100             hb7f2c08_1003    conda-forge
lcms2                     2.15                 hd6ba6f3_3    conda-forge
lerc                      4.0.0                hb486fe8_0    conda-forge
libabseil                 20230802.1      cxx17_h048a20a_0    conda-forge
libaec                    1.1.2                he965462_1    conda-forge
libass                    0.17.1               h80904bb_1    conda-forge
libblas                   3.9.0           19_osx64_openblas    conda-forge
libbrotlicommon           1.1.0                h0dc2134_1    conda-forge
libbrotlidec              1.1.0                h0dc2134_1    conda-forge
libbrotlienc              1.1.0                h0dc2134_1    conda-forge
libcblas                  3.9.0           19_osx64_openblas    conda-forge
libcurl                   8.4.0                h726d00d_0    conda-forge
libcxx                    16.0.6               hd57cbcb_0    conda-forge
libdeflate                1.19                 ha4e1b8e_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libexpat                  2.5.0                hf0c8a7f_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           13_2_0_h97931a8_1    conda-forge
libgfortran5              13.2.0               h2873a65_1    conda-forge
libglib                   2.78.0               hc62aa5d_0    conda-forge
libiconv                  1.17                 hac89ed1_0    conda-forge
libidn2                   2.3.4                hb7f2c08_0    conda-forge
libjpeg-turbo             3.0.0                h0dc2134_1    conda-forge
liblapack                 3.9.0           19_osx64_openblas    conda-forge
liblapacke                3.9.0           19_osx64_openblas    conda-forge
libnghttp2                1.55.1               hc0a10c5_0    conda-forge
libopenblas               0.3.24          openmp_h48a4ad5_0    conda-forge
libopencv                 4.8.1           py312h086e99c_3    conda-forge
libopenvino               2023.1.0             h93d8f39_1    conda-forge
libopenvino-auto-batch-plugin 2023.1.0             h93d8f39_1    conda-forge
libopenvino-auto-plugin   2023.1.0             h93d8f39_1    conda-forge
libopenvino-hetero-plugin 2023.1.0             h93d8f39_1    conda-forge
libopenvino-intel-cpu-plugin 2023.1.0             h93d8f39_1    conda-forge
libopenvino-ir-frontend   2023.1.0             h93d8f39_1    conda-forge
libopenvino-onnx-frontend 2023.1.0             h93d8f39_1    conda-forge
libopenvino-paddle-frontend 2023.1.0             h93d8f39_1    conda-forge
libopenvino-pytorch-frontend 2023.1.0             h93d8f39_1    conda-forge
libopenvino-tensorflow-frontend 2023.1.0             h93d8f39_1    conda-forge
libopenvino-tensorflow-lite-frontend 2023.1.0             h93d8f39_1    conda-forge
libopus                   1.3.1                hc929b4f_1    conda-forge
libpng                    1.6.39               ha978bb4_0    conda-forge
libprotobuf               4.24.3               he0c2237_1    conda-forge
libsqlite                 3.43.2               h92b6c6a_0    conda-forge
libssh2                   1.11.0               hd019ec5_0    conda-forge
libtasn1                  4.19.0               hb7f2c08_0    conda-forge
libtiff                   4.6.0                h684deea_2    conda-forge
libunistring              0.9.10               h0d85af4_0    conda-forge
libvpx                    1.13.1               he965462_0    conda-forge
libwebp-base              1.3.2                h0dc2134_0    conda-forge
libxcb                    1.15                 hb7f2c08_0    conda-forge
libxml2                   2.11.5               h3346baf_1    conda-forge
libzlib                   1.2.13               h8a1eda9_5    conda-forge
llvm-openmp               17.0.4               hb6ac08f_0    conda-forge
matplotlib-base           3.8.0           py312h1fe5000_2    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.4                  h93d8f39_2    conda-forge
nettle                    3.8.1                h96f3785_1    conda-forge
nspr                      4.35                 hea0b92c_0    conda-forge
nss                       3.94                 hd6ac835_0    conda-forge
numpy                     1.26.0          py312h5df92dc_0    conda-forge
opencv                    4.8.1           py312hb401068_3    conda-forge
openh264                  2.3.1                hf0c8a7f_2    conda-forge
openjpeg                  2.5.0                ha4da562_3    conda-forge
openpyxl                  3.1.2           py312h104f124_1    conda-forge
openssl                   3.1.4                hd75f5a5_0    conda-forge
p11-kit                   0.24.1               h65f8906_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    2.1.2           py312haf8ecfc_0    conda-forge
pcre2                     10.40                h1c4e4bc_0    conda-forge
pdfminer.six              20221105           pyhd8ed1ab_0    conda-forge
pdftopng                  0.2.3           py312h42a8359_13    conda-forge
pillow                    10.1.0          py312h0c70c2f_0    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
pixman                    0.42.2               he965462_0    conda-forge
poppler                   23.08.0              hd774cd1_3    conda-forge
poppler-data              0.4.12               hd8ed1ab_0    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
pugixml                   1.14                 he965462_0    conda-forge
py-opencv                 4.8.1           py312hdce95a9_3    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pycryptodome              3.19.0          py312h3144aa1_1    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pypdf2                    2.11.1             pyhd8ed1ab_0    conda-forge
python                    3.12.0          h30d4d87_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
readline                  8.2                  h9e318b2_1    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.10               h225ccf5_0    conda-forge
svt-av1                   1.7.0                he965462_0    conda-forge
tabulate                  0.9.0              pyhd8ed1ab_1    conda-forge
tbb                       2021.10.0            h1c7c39f_2    conda-forge
tk                        8.6.13               hef22860_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
wheel                     0.41.3             pyhd8ed1ab_0    conda-forge
x264                      1!164.3095           h775f41a_2    conda-forge
x265                      3.5                  hbb4e6a2_3    conda-forge
xorg-libxau               1.0.11               h0dc2134_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xz                        5.2.6                h775f41a_0    conda-forge
zlib                      1.2.13               h8a1eda9_5    conda-forge
zstd                      1.5.5                h829000d_0    conda-forge

Environment info

conda info

     active environment : camelot
    active env location : /Users/chris/miniconda3/envs/camelot
            shell level : 1
       user config file : /Users/chris/.condarc
 populated config files : /Users/chris/.condarc
          conda version : 23.1.0
    conda-build version : not installed
         python version : 3.9.13.final.0
       virtual packages : __archspec=1=x86_64
                          __osx=11.7.10=0
                          __unix=0=0
       base environment : /Users/chris/miniconda3  (writable)
      conda av data dir : /Users/chris/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/chris/miniconda3/pkgs
                          /Users/chris/.conda/pkgs
       envs directories : /Users/chris/miniconda3/envs
                          /Users/chris/.conda/envs
               platform : osx-64
             user-agent : conda/23.1.0 requests/2.28.2 CPython/3.9.13 Darwin/20.6.0 OSX/11.7.10
                UID:GID : 501:20
             netrc file : None
           offline mode : False
@PythonCHB PythonCHB added the bug Something isn't working label Nov 1, 2023
@PythonCHB PythonCHB changed the title ghostscript-python not isntalled ghostscript-python not installed Nov 1, 2023
@akrherz
Copy link
Contributor

akrherz commented Dec 21, 2023

I've got a python-ghostscript package in conda-forge now. Does installing it help with your bug?

@PythonCHB
Copy link
Author

yup, that works, but you have to install by hand. #27 should fix that :-)

Thanks,

-CHB

@akrherz
Copy link
Contributor

akrherz commented Jan 1, 2024

#26 should have fixed this with the 0.11 release

@PythonCHB
Copy link
Author

And indeed it has -- thanks!

Note: I do suggest you look at #27 -- in addition to the ghostscript-python dependency, it adds a test of actually reading a PDF -- a good conda build test will test that the entire install, including dependencies, works.

@PythonCHB
Copy link
Author

This can be closed out now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants