maxpmaxp / pdfreader

Python API for PDF documents
MIT License
113 stars 26 forks source link

PDFreader pip install stops during bitarray extension build #42

Closed sacman08 closed 4 years ago

sacman08 commented 4 years ago

Hello, I was attempting to add pdfreader to my computer and during the pip install it stops during the bitarray extension saying that Microsoft Visual C++ is required. I have confirmed Visual C++ is installed.

My setup: OS Windows 7 Python 3.8.3 Pip 19.2.3 MS Visual C++ Redistributable 14.26.28720

Specific error I see: 2020-06-28T07:15:32,756 building 'bitarray._bitarray' extension 2020-06-28T07:15:32,788 error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

What I have done: Following the link suggested points me to the same install I currently have on my computer. Reinstalled Visual C++ and pdfreader

The complete log file is included.
pdfreader.log

Any help would be appreciated.

DerekStarling commented 4 years ago

I have a very similar position to sacman08. Window 7 Pro SP1 Python 3.8.2 pip 20.1.1 MS Visual C++ 2015-2019 Redistributable (x64) - 14.26.28720 (installed today)

There do seem to be 6 other versions of MS Visual C++ for various reasons unknown to me - ranging from 10.0.xxx to 14.10.xxx

pdfreader.log

fyi - pdfreader installed perfectly on a mac...

Thanks

DerekStarling commented 4 years ago

Max & Sacman,

I solved this by running the ms module:
visualcppbuildtools_full.exe
downloaded from here: http://go.microsoft.com/fwlink/?LinkId=691126&fixForIE=.exe.

I ran that and pdfreader install worked. I found this solution on stack overflow, here:
https://stackoverflow.com/a/44953739/7575617

It seems that it is not related just to pdfreader, but other modules that require binary bitarrays. It looks like somewhere in pdfreader setup.py it gets called. I cannot see where. That it could not find it when windows thought it was on our machines, I do not understand, but now I have a working system.

The only difference I can see on programs and features is an install of Microsoft Visual C++ Build Tools that is 3.12GB (ouch!). Not sure if I can now uninstall it.

Hope this helps

mandarmalve commented 4 years ago

Max & Sacman,

I solved this by running the ms module: visualcppbuildtools_full.exe downloaded from here: http://go.microsoft.com/fwlink/?LinkId=691126&fixForIE=.exe.

I ran that and pdfreader install worked. I found this solution on stack overflow, here: https://stackoverflow.com/a/44953739/7575617

It seems that it is not related just to pdfreader, but other modules that require binary bitarrays. It looks like somewhere in pdfreader setup.py it gets called. I cannot see where. That it could not find it when windows thought it was on our machines, I do not understand, but now I have a working system.

The only difference I can see on programs and features is an install of Microsoft Visual C++ Build Tools that is 3.12GB (ouch!). Not sure if I can now uninstall it.

Hope this helps

Yes it works.

Thanks for the help !!!