import PyPDF2
print("PyPDF2==" + PyPDF2.__version__)
Looks like that did the trick.
my project is in a venv and I had been using the pycharm terminal to pip anything,
looks like before I was using venv I had installed it using CMD directly.
I'm still not clear on why if I use pyinstaller through Pycharm it tries to use things installed using cmd, I would think those are separated somehow, but really I do have a loose grasp of how this all works, could you recommend some further reading so I can avoid this? should I delete every installation of everything outside my venv?
ps thank you very much now I can bring a finished product into work and blow some minds with it!!! :)
i have already do that but i get other error
OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html
although it is installed already
print("PyPDF2==" + PyPDF2.version)
i have already do that but i get other error OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html although it is installed already
Hey @au3m,
Doing just the installation sometimes might not help. Sometimes you might need to set the things in the computer's environment variables to access it easily.
So try setting "ghostscript" to your environment variables.
STEPS FOR REFERENCE:
copy the path where you have installed ghostscript.
If you are using windows - search for "Edit the system environment variable" .
above dialog should open. Click on the "environment variable" tab.
Under "system variables" section double click "path".
Click on the open space and paste the copied path of the ghostscript.
Click OK and for precautions restart your device.
After this your program should run fine without giving the ghostscript related error.
print("PyPDF2==" + PyPDF2.version)
i have already do that but i get other error OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html although it is installed already
Hey @au3m,
Doing just the installation sometimes might not help. Sometimes you might need to set the things in the computer's environment variables to access it easily.
So try setting "ghostscript" to your environment variables.
STEPS FOR REFERENCE:
copy the path where you have installed ghostscript.
If you are using windows - search for "Edit the system environment variable" .
above dialog should open. Click on the "environment variable" tab.
Under "system variables" section double click "path".
Click on the open space and paste the copied path of the ghostscript.
Click OK and for precautions restart your device.
After this your program should run fine without giving the ghostscript related error.
@KshitizPandya
Thanks bro it works now ☺️
I think the problem is based on a missed migration considering the naming adjustments within PyPDF2/pypdf - see the following doc: https://pypdf2.readthedocs.io/en/stable/user/migration-1-to-2.html
Following the The Deprecation Process of PyPDF2/pypdf they are not longer tolerated.
I replaced the handlers.py-file with the file from the PR below and the cli is working again for me.
PR from @MartinThoma can be found here: #307
If anyone trying to do this on colab then run the following steps:
!pip install ghostscript
!pip install camelot-py[cv]
!pip install excalibur-py
!apt install ghostscript python3-tk
And after that check if installed:
from ctypes.util import find_library
# It will display `libgs.so.9` if installed or will print `None` if not
print(find_library("gs"))
If still doesn't work:
Source: here
print("PyPDF2==" + PyPDF2.version)
i have already do that but i get other error OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html although it is installed already
Hey @au3m, Doing just the installation sometimes might not help. Sometimes you might need to set the things in the computer's environment variables to access it easily. So try setting "ghostscript" to your environment variables.
STEPS FOR REFERENCE:
copy the path where you have installed ghostscript.
If you are using windows - search for "Edit the system environment variable" .
above dialog should open. Click on the "environment variable" tab.
Under "system variables" section double click "path".
Click on the open space and paste the copied path of the ghostscript.
Click OK and for precautions restart your device.
After this your program should run fine without giving the ghostscript related error.
Thanks! Help me a lot.
Hey @saidakyuz , I did a bit of work around and now my camelot is working fine. Am mentioning the steps below if you want to refer.
Set anaconda env (preferably use python 3.7)
Install camelot -
pip install camelot-py[base]
It will itself download the pyPDF2 version 3.0.0, so you need to extensively change the version -
pip install 'PyPDF2<3.0'
I used pyCharm to work with my script so I set the environment from settings and then it worked fine.
Environment packages: camelot-py 0.10.1 ghostscript 0.7 pypdf2 2.0.0
Note: It might sometimes create error showing ghostscript is not installed. You can explicitly install it from: https://ghostscript.com/releases/gsdnld.html and then set it computer's environment variable to bypass any issues and restart.
Then the issue should be resolved.
OUTPUT:
Hope it helps.
I set all the libs exact same version as yours, yet error remains...
Environment packages: camelot-py 0.10.1 ghostscript 0.7 pypdf2 2.0.0