bzr python-based installer requires 32-bit python on windows; unclear message

Bug #331342 reported by Chris West on 2009-02-19
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Bazaar Windows Installers

Bug Description

I have 64-bit python 2.5.2 installed correctly.

The installer claims:
Cannot install
Python version 2.5 required, which was not found in the registry.

This is because it is foolish. Wonderful Windows has detected that it is a foolish 32-bit app, and has pointed it at the nice, safe, 32-bit only area of the registry via. the almight WoW64 emulation layer. This nice, safe 32-bit area of the registry lacks python, as there are no nice, safe pythons installed, only powerful 64-bit pythons.

If you forgive it this folly by allowing it out of the nice, safe box in which it's been placed, and you run it with far too many permissions for such a naïve little application, the post install script quoth:
*** Could not load Python ***

And finally, but possibly less relevantly:
C:\Users\Faux>\Python25\Scripts\bzr --version
bzr: ERROR: exceptions.NotImplementedError: We must have one of fcntl, pywin32, or ctypes available to support OS locking.

Traceback (most recent call last):
  File "C:\python25\lib\site-packages\bzrlib\", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "C:\python25\lib\site-packages\bzrlib\", line 793, in run_bzr
  File "C:\python25\lib\site-packages\bzrlib\", line 539, in run_argv_aliases
  File "C:\python25\lib\site-packages\bzrlib\", line 853, in ignore_pipe
    result = func(*args, **kwargs)
  File "C:\python25\lib\site-packages\bzrlib\", line 2985, in run
    from bzrlib.version import show_version
  File "C:\python25\lib\site-packages\bzrlib\", line 23, in <module>
    from bzrlib import (
  File "C:\python25\lib\site-packages\bzrlib\", line 1998, in <module>
    class BzrDirMetaFormat1(BzrDirFormat):
  File "C:\python25\lib\site-packages\bzrlib\", line 2009, in BzrDirMetaFormat1
    _lock_class = lockdir.LockDir
  File "C:\python25\lib\site-packages\bzrlib\", line 106, in __getattribute__
    obj = _replace()
  File "C:\python25\lib\site-packages\bzrlib\", line 89, in _replace
    obj = factory(self, scope, name)
  File "C:\python25\lib\site-packages\bzrlib\", line 192, in _import
    module = __import__(module_python_path, scope, scope, [member])
  File "C:\python25\lib\site-packages\bzrlib\", line 109, in <module>
    from bzrlib import (
  File "C:\python25\lib\site-packages\bzrlib\", line 503, in <module>
    "We must have one of fcntl, pywin32, or ctypes available"
NotImplementedError: We must have one of fcntl, pywin32, or ctypes available to support OS locking.

bzr 1.12rc1 on python 2.5.2 (win32)
arguments: ['C:\\python25\\Scripts\\bzr', '--version']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
*** Bazaar has encountered an internal error.
    Please report a bug at
    including this traceback, and a description of what you
    were doing when the error occurred.

Windows Vista SP1 x64 Ultimate.
Python 2.5.2 x64.

Mark Hammond (mhammond) wrote :

The installer *is* correct, just its message isn't that helpful - you simply can't mix and match 32 and 64bit binaries. I'm not sure about ctypes, but there will never be a pywin32 64bit Python 2.5 build - only 2.6 and later. It is possible that Python 2.5.4 has ctypes enabled though - that might be worth checking. Alternatively, just install the 32bit version of Python 2.5 - it works just fine on a 64bit OS.

It seems like we should at least give a better message about why.

summary: - Installer fails on 64-bit Windows
+ bzr installer requires 32-bit python on windows
summary: - bzr installer requires 32-bit python on windows
+ bzr installer requires 32-bit python on windows; unclear message
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Martin Pool (mbp) wrote :

See also bug 345998, where this problem was also hit, also asking that there should be a python2.6 installer.

summary: - bzr installer requires 32-bit python on windows; unclear message
+ bzr python-based installer requires 32-bit python on windows; unclear
+ message
GuilhemBichot (guilhem-bichot) wrote :

Hello, I reported the problem as part of in March.
The logic is quite simple: if one has a x64 Windows, he will naturally install a x64 Python. The fact that there is no python-based Windows bzr installer working in this case, is a problem: it forces people to uninstall their python x64 and install a python x86. Could you please give an update on the present bug?

Martin Pool (mbp) wrote :

Hi Guilhem,

OK, if Python x64 can't coexist with Python x86 that does make it more serious, because I can see that people might have other requirements for the 64-bit version.

So this bug would be solved if we also made binary builds against the 64-bit Python?

Changed in bzr:
importance: Low → Medium
GuilhemBichot (guilhem-bichot) wrote :

yes, I think so.

GuilhemBichot (guilhem-bichot) wrote :

And until this is fixed, you might want to put a warning in , so that users know that they should use a 32-bit Python for the Python-based installers. Otherwise they'll just lose time rediscovering this bug.

Martin Pool (mbp) on 2009-12-04
tags: added: mysql packaging win32
Martin Pool (mbp) wrote :

I've added a note to the windows download page pointing this out.

Our Windows build & packaging process is still somewhat manual so I think it would slow it down further to make 64-bit python builds of every release, especially if you consider that there are installers for 2.4, 2.5 and 2.6. However, perhaps it would at least be reasonable to make an installer for bzr 2.0.2 against python 2.6?

It would also help if someone who has a 64-bit python2.6 installed could re-test running bzr from source - if they get the same error quoted in the original message there may be some simpler way around it.

icey502 (icey502) wrote :

Hey guys,

I have an AMD 64 bit Windoze machine and I am seeing this error. It does indeed seem to prevent me from exploring the wonders of Bazaar. I'm willing to run the build from source and post the error if that would help - but I'm a python-newbie so you might have to lay some instructions on me ;-)



ANelson (anelson) wrote :

I'm impacted by this bug as well, as the 32-bit binaries shipped with the Bzr installer run out of memory when migrating my huge SVN repos with 50k files, ~24k revisions, and ~25GB of data.

I tried building bzr from source on 64-bit Python 2.6, but the missing zlib header files tripped me up. In case anyone's interested this is the error I got after doing a 'python build':

bzrlib/_chk_map_pyx.c(32) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory

  Cannot build extension "bzrlib._chk_map_pyx".
  Use "build_ext --allow-python-fallback" to use slower python implementations instead.

At any rate, I don't think it's realistic to count the build from source option as a viable workaround, at least not as of now.

Incidentally, I had almost the exact same problem trying to migrate this repos to Mercurial. It really sucks as it's preventing me from migrating our team away from SVN

Martin Pool (mbp) wrote :

Apparently python2.6 can now do 32<->64 bit cross-compiles on Windows.

Changed in bzr-windows-installers:
status: New → Confirmed
importance: Undecided → Medium
Kirill Suzev (suzev-kirill) wrote :

I ran into the same problem on Win7, 64-bit.
Maybe a better solution is to ship 64-bit binaries? That would solve the problem.

Kirill Suzev (suzev-kirill) wrote :

Can you give any estimates about when 64-bit installer for Windows will be available?

Greg (gregspecialsource) wrote :

A 64bit Windows build would be a temporary work around for large files would it not?
I would love to see this sooner if possible. At present, Bazaar seems to need memory for at least 3x copies of the working data, so the largest file a Windows user can commit is somewhere between 650mb -> 1gb.

Dirk Räder (db6edr) wrote :

Any updates on this issue? Especially @mbp?

Would it help to compile Bazaar using IronPython, thus creating a .NET executable? As .NET executables can be compiled to target both x86 and x64 CPUs, this would probably also tackle at least for x64 Windows (out of memory exceptions on Windows machines)

Rene Leonhardt (rele) wrote :

It's a shame that there is still no Windows 64-bit build.

Are there any helpful hints to build with mingw?
I got not very far with mingw64, the ld error messages are no help at all.

Or is it possible to build with LLVM/Clang 3.0?

Nathan Osman (george-edison55) wrote :

I am pleased to announce that I have successfully built a 64-bit version of Bazaar for Python 2.7. You can get the Python installer and MSI files here:

Basically the process for doing this was as follows:

1. Install the Windows 7.1 SDK.
2. Install Microsoft Visual C++ Express 2008 (NOT 2010 - because none of the official Python builds use it).
3. Download the Bazaar source code.
4. Follow the instructions here:
5. Run 'python bdist_wininst' to generate the installer.

Thomas B (tekktura) wrote :

I was able to install v2.5.1 with Qt interface on python 2.7 (64bit) using a bit longer route with unofficial binary packages. These are available for example from:
My setup as almost according to This is what I've used:
- (from
- (from
- (from
- (setup from source:
- PyQt-Py2.7-x64-gpl-4.9.6-1.‌exe (Qt GPL included + tools)
- bzrtools-2.3.0.tar.gz (launchpad)
- qbzr-0.23.0.tar.gz (launchpad, setup from source)

Also I needed to correct c:\Python27\Scripts\bzr.bat to yield something like:
@C:\Python27\python.exe C:\Python27\Scripts\bzr %*

After all these steps 'bzr explorer' should launch.

Jelmer Vernooij (jelmer) on 2017-11-08
tags: added: check-for-breezy
Jelmer Vernooij (jelmer) on 2019-06-16
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers