ZODB 3 for 64 bit windows - windows

I tried to install ZODB3 for 64 bit Python 2.7 with pip. This installation requires a local compiler to compile the BTrees extension. As I do not have the needed MS compiler installed:
Is there a binary 64 bit Windows installer for ZODB on Python 2.7 ? I used Google but did not succeed
Is BTrees really required or can I install ZODB3 without BTrees ?
Cherrs, Uwe.

The ZODB3 package comes with pre-compiled eggs for Windows, see the PyPI page for ZODB3.
You need to tell pip explicitly that it needs to install an egg; it normally does not support installing from an egg:
pip install --egg ZODB3
Alternatively, you could use easy_install instead.

Struggling with ZODB3 easy_install/pip/compiler woes on Windows? Try Christoph Gohlke's "Unofficial Windows Binaries for Python Extension Packages" download page:
64 and 32 bit ZODB3 binaries packaged as .exe installers are available for python 2.5/2.6/2.7: http://www.lfd.uci.edu/~gohlke/pythonlibs/#zodb3
You will need to run the appropriate zope.interface installer from the same source first: http://www.lfd.uci.edu/~gohlke/pythonlibs/#Zope.interface

Related

Should I use PIPWIN or PIP for installing a library?

I was wondering in which scenarios I can use pipwin instead of pip? I am aware that pip is the standard.
From pipwin it states
pipwin is like pip, but it installs precompiled Windows binaries provided by Christoph Gohlke.
Does it offer any advantage if we are sharing our programs after packaging into a EXE with others - using windows?
pip installs from PyPI. pipwin installs from Christoph Gohlke's Unofficial Windows Binaries for Python Extension Packages. Quite often there are more and better compiled wheels at the Christoph's Unofficial site.
Compare, for example, PyAudio (one of the most problematic packages, see how many question there are). At PyPI there're currently wheels for Python 2.7 and 3.4-3.6. At the Christoph's Unofficial site there are wheels for Python 2.7 and 3.4-3.10.
The bottom line is: always consider Christoph's Unofficial site and pipwin when pip install failed to install a package for Windows.
As the description says here https://pypi.org/project/pipwin/
pipwin installs unofficial python package binaries for windows provided by Christoph Gohlke
Always trust the official sources and don't go for unofficial resources especially while working on enterprise applications. Please use only pip

Cannot install libc6-devel-i386 on windows

How to install the package on windows? I have seen a lot of Ubuntu guides but don't know how to install for windows
You need libc6 header files from this library to include with your c++ programs that is not OS specific.

How to use binary python installers for a mismatching python version?

I need to run a 64bit binary python installer for windows (reportlab‑2.7.win‑amd64‑py2.6.exe) downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/.
Unfortunately, I have 64bit python 2.7 installed and can't switch to python 2.6. For compatibility reasons, I also can't switch to the reportlabs package for python 2.7. I am sure that the python 2.6 package is compatible with python 2.7.
The .exe installer won't install since it does not find python 2.6 in the registry. Is there anything I can do?
According to this post and this post, I created the following registry file code to set the required registry keys.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Python]
[HKEY_CURRENT_USER\Software\Python\Pythoncore]
[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6]
[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\InstallPath]
#="C:\\Python27"
[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\PythonPath]
#="C:\\Python27;C:\\Python27\\Lib\\;C:\\Python27\\DLLs\\"
Save this as a .reg file (e.g. "file.reg") and run it.
Basically, this file stores in the registry that python 2.6 is installed in the python 2.7 folders. You may have to adapt the paths.
After the registry keys were set, I was able to install the 64bit reportlabs package using the binary installer for python 2.6 with a python 2.7 installation. I didn't encounter any compatibility issues.
If you want to use this way for 32bit python, see the above mentioned posts.

How to install Poppler on Windows?

The most recent version of ScraperWiki depends on Poppler (or so the GitHub says). Unfortunately, it only specifies how to get it on macOS and Linux, not Windows.
A quick googling turned up nothing too promising. Does anyone know how to get Poppler on Windows for ScraperWiki?
Other answers have linked to the correct download page for Windows users but do not specify how to install them for the uninitiated.
Go to this page and download the binary of your choice. In this example we will download and use poppler-0.68.0_x86.
Extract the archive file poppler-0.68.0_x86.7z into C:\Program Files. Thus, the directory structure should look something like this:
C:
└ Program Files
└ poppler-0.68.0_x86
└ bin
└ include
└ lib
└ share
Add C:\Program Files\poppler-0.68.0_x86\bin to your system PATH by doing the following: Click on the Windows start button, search for Edit the system environment variables, click on Environment Variables..., under System variables, look for and double-click on PATH, click on New, then add C:\Users\Program Files\poppler-0.68.0_x86\bin, click OK.
If you are using a terminal to execute poppler (e.g. running pdf2image in command line), you may need to reopen your terminal for poppler to work.
Done!
Poppler Windows binaries are available from ftp://ftp.gnome.org/Public/GNOME/binaries/win32/dependencies/ -- but note that those aren't quite up-to-date.
If you're looking for Python (2.7) bindings (as this question's tag suggests), I requested them in the past via this bug report. A couple of people apparently managed to produce something, but I haven't checked those out yet.
As for a more recent (python bindings unrelated) poppler Windows binaries Google result, see http://blog.alivate.com.au/poppler-windows/
Finally, there's the brand-new (and currently very frequently updated) PyGObject all-in-one installer (mainly aiming to provide PyGObject-instrospected Gtk+3 Python bindings etc. for Windows), so if that's what you're looking for, go to http://sourceforge.net/projects/pygobjectwin32/files/?source=navbar
Download Poppler Packaged for Windows
https://github.com/oschwartz10612/poppler-windows/releases
I threw together a quick repo with the latest Poppler prebuilt-binaries packaged with dependencies for Windows. Built with the help of conda-forge and poppler-feedstock. Includes the latest poppler-data.
With anaconda installed on windows one can simply execute:
conda install -c conda-forge poppler
UPDATE 2
See the answer by Owen Schwartz.
UPDATE 1
Rumpel Stielzchen's comment:
This site is no longer maintained. Poppler version 0.68 is very
outdated today. You find the latest version compiled also for Windows
here: https://anaconda.org/conda-forge/poppler/files Sadly there is no
32 bit version, only 64 bit
… but this package contains no dependencies:
It seems that the Anaconda people have a tool to download a package
and all dependencies. And there is a file in the TAR package:
index.json which lists the package on which it depends. I downloaded
the dependencies one by one, and yes: It WAS a pain.
Original answer
Latest Poppler Windows binaries can be found here:
http://blog.alivate.com.au/poppler-windows/
Chocolatey
Poppler is available as Chocolatey package:
choco install poppler
By default Poppler is installed in C:\ProgramData\chocolatey\lib\poppler and shims are automatically created for the following tools: pdfdetach, pdffonts, pdfimages, pdfinfo, pdfseparate, pdftocairo, pdftohtml, pdftoppm, pdftops, pdftotext, pdfunite.
To update Poppler, run:
cup poppler
Scoop
Install from the main bucket:
scoop install poppler
By default Poppler is installed in ~\scoop\apps\poppler and shims are automatically created for the following tools: pdfdetach, pdffonts, pdfimages, pdfinfo, pdfseparate, pdftocairo, pdftohtml, pdftoppm, pdftops, pdftotext, pdfunite.
To update Poppler, run:
scoop update poppler
TeX Live
As mentioned in another answer, MiKTeX currently ships with Poppler tools, and so does another LaTeX distribution, TeX Live.
From the guide:
Command-line tools.
A number of Windows ports of common Unix command-line programs are installed along with the usual TeX Live binaries. These include gzip, zip, unzip, and the utilities from the poppler suite (pdfinfo, pdffonts, …)
Poppler suite is located by default in C:\texlive\<year>\bin\win32 and, if you can compile your LaTeX documents, should work out of the box since this location is added to the PATH by the installer.
To Simply install Poppler on Windows run through the below mentioned steps without touching the environmental varible.
Download the Latest Poppler Binary from the URL: http://blog.alivate.com.au/poppler-windows/index.html
Unzip it and copy the poppler-0.68.0_x86 folder in some path for ex, C:/User/Poppler/poppler-0.68.0_x86/poppler-0.68.0/bin
Now go to your Python code where you want to call Poppler for image conversion and use the below mentioned code snippet:
from pdf2image import convert_from_path
pages = convert_from_path('MyPdf.pdf', 500, poppler_path = r'C:\User\Poppler\poppler-0.68.0_x86\poppler-0.68.0\bin')
for page in pages:
page.save('out.jpg', 'JPEG')
You should consider using Windows Subsystem for Linux (WSL).
Enable WSL on Windows 10 (it will not work on S edition)
Install Ubuntu (latest version) on WSL from the Windows Store
Open Ubuntu command-line
In the Ubuntu Command-line, run the following commands:
sudo apt-get update
sudo apt-get upgrade
sudo apt install poppler-utils
pdftocairo -v - to check the installed version
You can then run pdftocairo (for example) in two ways:
Within the Ubuntu command-line: pdftocairo ...
Directly from Windows command-line: wsl pdftocairo...
NOTE: There is a default version of poppler for each release of Ubuntu. You will need to look up the instructions (there should be plenty on the internet), for how to install the latest version of poppler-utils on Ubuntu. This might involve quite a few steps, which will compile from the source code. For example, something like this https://askubuntu.com/a/722955. And then you might get a lot of problems.
The latest version of Ubuntu 19.04, can install Poppler 74. But Ubuntu 18.04 seems to be the latest version you can install for WSL for now, and that installs Poppler 62.
It looks like a version that is build-able with visual studio can be found here https://bitbucket.org/merarischroeder/poppler-for-windows/overview
Up to date binaries for Windows x64, Mac OSX-64, Linux-64bit can be found here
https://anaconda.org/conda-forge/poppler/files
Poppler version 0.84 is available at the link as of this writing which is very current.
The accepted answer and the link given by Alexey are no longer pointing to current versions of poppler
Update :
As of March 8, 2021 the best answer is by Owen Schwarz above https://stackoverflow.com/a/62615998/590388
Another option is that if you have installed MikTeX then poppler is included by default and is probably already in your PATH. In my case the binaries were installed under: C:\Program Files\MiKTeX 2.9\miktex\bin\x64
MSYS2 has the latest version available for install.
If you don't want to install the whole enviroment (or you wanted some kind of portable version) you could also just download Poppler straight from the repository, but then you'd also have to manually handle dependencies. Namely: libwinpthread, nspr, gcc-libs, nss, curl, brotli, openssl, libidn2, libiconv, gettext, libunistring, nghttp2, libpsl, libjpeg-turbo, lcms2, openjpeg2, libpng, zlib, libtiff, xz and zstd.
Install the Microsoft Visual C++ Build Tools
Install poppler through the Conda prompt conda:
conda install -c conda-forge poppler
please note: if you don't have anaconda installed, it can be downloaded from here,
https://docs.anaconda.com/anaconda/install/windows/
Installing Poppler on Windows
Go to https://github.com/oschwartz10612/poppler-windows/releases/
Under Release 21.11.0-0 Latest v21.11.0-0
Go to Assets 3 Download
Release-21.11.0-0.zip
Adding Poppler to path
Add Poppler installed to loaction : C:\Users\UserName\Downloads\Release-21.11.0-0.zip
Add C:\Users\UserName\Downloads\Release-21.11.0-0.zip to system variable path in Environment Variable
This is what I did.
Install msys2
Open msys2 shell and then run:
To List available packages named poppler
pacman -Ss poppler
To Install the package
pacman -S mingw-w64-ucrt-x86_64-poppler
Open MSYS2 UCRT64 Shell and access poppler binaries
The binaries are installed at:
C:\msys64\ucrt64\bin

How can I manually Installing DBD-Oracle 1.17 in ActivePerl on Windows?

After installing Active Perl 5.8.8 Build 822 on WindowsXP, I do not see DBD-Oracle in "View All Packages" of Perl Package Manager.
The CPAN location of the same is http://search.cpan.org/dist/DBD-Oracle-1.17/,
but I don't know the process to manually install this tar(DBD-Oracle-1.17.tar.gz) in ActivePerl.
Install Oracle Instant Client for Windows.
Do you really need to use ActivePerl 5.8.8 as the process is easier in 5.8.9.827 and above. Usually you just do:
cpan P/PY/PYTHIAN/DBD-Oracle-1.17.tar.gz
and if you don't have Microsoft Visual C on your path it downloads MinGW and installs it. I think if you are before 5.8.9 of ActivePerl you might have to install MinGW yourself with:
ppm install MinGW
but I think in 5.8.8 you will have to download, install and configure MinGW and dmake manually though, so you may not want to bother...
BTW, Do you really need to use DBD::Oracle 1.17? That is really old now. 1.26 is the latest.

Resources