[tahoe-dev] Tahoe 1.8.2 installation error on Window XP 32bit

Shu Lin linshu at gmail.com
Fri Jun 10 14:58:03 PDT 2011


> ------------------------------
>
> Message: 2
> Date: Thu, 09 Jun 2011 20:12:21 +0100
> From: David-Sarah Hopwood <david-sarah at jacaranda.org>
> To: tahoe-dev at allmydata.org
> Subject: Re: [tahoe-dev] Tahoe 1.8.2 installation error on Window XP
>        32bit
> Message-ID: <4DF11B15.5030808 at jacaranda.org>
> Content-Type: text/plain; charset="utf-8"
>
> On 09/06/11 20:03, David-Sarah Hopwood wrote:
>> On 06/06/11 09:08, Shu Lin wrote:
>>> ImportError: No module named win32api
>>
>> You can work around this in either of two ways:
>>
>> 1. download and install pywin32 from
>> <http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win32-py2.6.exe/download>
>>
>> 2. download and install a later version of Twisted; I suggest 10.2 which is
>> at
>> <http://twistedmatrix.com/Releases/Twisted/10.2/Twisted-10.2.0.winxp32-py2.6.msi>
>
> Here's a better fix, since it doesn't require you to manually install
> anything. Edit src/allmydata/_auto_deps.py and change the line
>
>    "Twisted >= 2.4.0",
>
> to
>
>    "Twisted >= 9.0.0",
>
>
> (The comma is part of the line.)
>
> Then repeat the installation from 'python setup.py build'.
>
> --
> David-Sarah Hopwood ? http://davidsarah.livejournal.com
>

David,

Thanks for looking at this problem.

Changing dependency twisted version doesn't work although it seems
going forward a little bit. From below log, we see it was still
getting twisted 8.2.0. Instead of "No module named win32api", the new
error is "No module named twisted.python".

Thanks,
-Shu

===
log:
===


C:\tahoe-lafs>c:\Python26\python.exe setup.py build
Not found: tahoe-deps
Not found: ../tahoe-deps
c:\tahoe-lafs\Twisted-8.2.0-py2.6-win32.egg\twisted\web\microdom.py:181:
SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (oldChild.parentNode is self,

Installed c:\tahoe-lafs\twisted-8.2.0-py2.6-win32.egg
Searching for zope.interface
Reading http://pypi.python.org/simple/zope.interface/
Best match: zope.interface 3.6.3
Downloading http://pypi.python.org/packages/2.6/z/zope.interface/zope.interface-3.6.3-py2.6-win32.egg#md5=cc6b2d0d8e50d13c86ee1f2183d3c5ac
Processing zope.interface-3.6.3-py2.6-win32.egg
creating c:\tahoe-lafs\zope.interface-3.6.3-py2.6-win32.egg
Extracting zope.interface-3.6.3-py2.6-win32.egg to c:\tahoe-lafs

Installed c:\tahoe-lafs\zope.interface-3.6.3-py2.6-win32.egg
running darcsver
setup.py darcsver: using extant version file ['src/allmydata/_version.py']
running develop
Not found: tahoe-deps
Not found: ../tahoe-deps
running egg_info
writing requirements to src\allmydata_tahoe.egg-info\requires.txt
writing src\allmydata_tahoe.egg-info\PKG-INFO
writing top-level names to src\allmydata_tahoe.egg-info\top_level.txt
writing dependency_links to src\allmydata_tahoe.egg-info\dependency_links.txt
writing entry points to src\allmydata_tahoe.egg-info\entry_points.txt
reading manifest file 'src\allmydata_tahoe.egg-info\SOURCES.txt'
writing manifest file 'src\allmydata_tahoe.egg-info\SOURCES.txt'
running build_ext
Creating c:\tahoe-lafs\support\lib\site-packages\site.py
Processing setuptools_darcs-1.2.12.egg
Copying setuptools_darcs-1.2.12.egg to c:\tahoe-lafs\support\lib\site-packages
Adding setuptools-darcs 1.2.12 to easy-install.pth file

Installed c:\tahoe-lafs\support\lib\site-packages\setuptools_darcs-1.2.12.egg
Creating c:\tahoe-lafs\support\lib\site-packages\allmydata-tahoe.egg-link
(link to src)
Adding allmydata-tahoe 1.8.2 to easy-install.pth file
Installing tahoe.pyscript script to support/Scripts
Installing tahoe script to support/Scripts

Installed c:\tahoe-lafs\src
Processing dependencies for allmydata-tahoe==1.8.2
Searching for pycryptopp>=0.5.20
Reading http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-dep-sdists/
Reading http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-lafs-dep-eggs/
Best match: pycryptopp 0.5.25-r761
Downloading http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-lafs-dep-eggs/pycryptopp-0.5.25_r761-py2.6-win32.egg
Processing pycryptopp-0.5.25_r761-py2.6-win32.egg
creating c:\tahoe-lafs\support\lib\site-packages\pycryptopp-0.5.25_r761-py2.6-win32.egg
Extracting pycryptopp-0.5.25_r761-py2.6-win32.egg to
c:\tahoe-lafs\support\lib\site-packages
Adding pycryptopp 0.5.25-r761 to easy-install.pth file

Installed c:\tahoe-lafs\support\lib\site-packages\pycryptopp-0.5.25_r761-py2.6-win32.egg
Searching for mock
Reading http://pypi.python.org/simple/mock/
Reading http://www.voidspace.org.uk/python/mock/
Reading http://www.voidspace.org.uk/python/mock.html
Best match: mock 0.8.0alpha1
Downloading http://www.voidspace.org.uk/downloads/mock-0.8.0alpha1.tar.gz#egg=mock-dev
Processing mock-0.8.0alpha1.tar.gz
Running mock-0.8.0alpha1\setup.py -q bdist_egg --dist-dir
c:\docume~1\slin\locals~1\temp\easy_install-2xhtwa\mock-0.8.0alpha1\egg-dist-tmp-u2airi

Setting up environment to run scripts for the current user...
Already done: associate the filetype .pyscript with Python.File for
the current user.
Already done: add .pyscript to the user environment variable PATHEXT.
Already done: add .pyw to the user environment variable PATHEXT.
zip_safe flag not set; analyzing archive contents...
Adding mock 0.8.0alpha1 to easy-install.pth file

Installed c:\tahoe-lafs\support\lib\site-packages\mock-0.8.0alpha1-py2.6.egg
Searching for pyasn1>=0.0.8a
Reading http://pypi.python.org/simple/pyasn1/
Best match: pyasn1 0.0.13b
Downloading http://pypi.python.org/packages/2.6/p/pyasn1/pyasn1-0.0.13b-py2.6.egg#md5=f80684d028e193e0df7a562bef73afec
Processing pyasn1-0.0.13b-py2.6.egg
creating c:\tahoe-lafs\support\lib\site-packages\pyasn1-0.0.13b-py2.6.egg
Extracting pyasn1-0.0.13b-py2.6.egg to c:\tahoe-lafs\support\lib\site-packages
Adding pyasn1 0.0.13b to easy-install.pth file

Installed c:\tahoe-lafs\support\lib\site-packages\pyasn1-0.0.13b-py2.6.egg
Searching for pycrypto==2.0.1,==2.1.0,>=2.3
Reading http://pypi.python.org/simple/pycrypto/
Reading http://pycrypto.sourceforge.net
Reading http://www.pycrypto.org/
Reading http://www.amk.ca/python/code/crypto
Best match: pycrypto 2.3
Downloading http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-lafs-dep-eggs/pycrypto-2.3-py2.6-win32.egg
Processing pycrypto-2.3-py2.6-win32.egg
creating c:\tahoe-lafs\support\lib\site-packages\pycrypto-2.3-py2.6-win32.egg
Extracting pycrypto-2.3-py2.6-win32.egg to
c:\tahoe-lafs\support\lib\site-packages
Adding pycrypto 2.3 to easy-install.pth file

Installed c:\tahoe-lafs\support\lib\site-packages\pycrypto-2.3-py2.6-win32.egg
Searching for Nevow>=0.6.0
Reading http://pypi.python.org/simple/Nevow/
Reading http://divmod.org/trac/wiki/DivmodNevow
Reading http://www.divmod.org/
Reading http://divmod.org/projects/nevow
Best match: Nevow 0.10.0
Downloading http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-dep-sdists/Nevow-0.10.0.tar.bz2
Processing Nevow-0.10.0.tar.bz2
Running Nevow-0.10.0\setup.py -q bdist_egg --dist-dir
c:\docume~1\slin\locals~1\temp\easy_install-yuf_dx\Nevow-0.10.0\egg-dist-tmp-g6cwla
Traceback (most recent call last):
  File "setup.py", line 417, in <module>
    **setup_args
  File "c:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "c:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\develop.py",
line 23, in run
    self.old_run()
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\develop.py",
line 33, in old_run
    self.install_for_development()
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\develop.py",
line 103, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\easy_install.py",
line 526, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\pkg_resources.py",
line 573, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\pkg_resources.py",
line 823, in best_match
    return self.obtain(req, installer) # try and download/install
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\pkg_resources.py",
line 835, in obtain
    return installer(requirement)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\easy_install.py",
line 453, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\easy_install.py",
line 483, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\easy_install.py",
line 663, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\easy_install.py",
line 938, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\command\easy_install.py",
line 927, in run_setup
    run_setup(setup_script, args)
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\sandbox.py",
line 62, in run_setup
    lambda: execfile(
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\sandbox.py",
line 105, in run
    return func()
  File "C:\tahoe-lafs\setuptools-0.6c16dev3.egg\setuptools\sandbox.py",
line 64, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 3, in <module>

  File "c:\docume~1\slin\locals~1\temp\easy_install-yuf_dx\Nevow-0.10.0\nevow\__init__.py",
line 5, in <module>
  File "c:\docume~1\slin\locals~1\temp\easy_install-yuf_dx\Nevow-0.10.0\nevow\_version.py",
line 2, in <module>
ImportError: No module named twisted.python

C:\tahoe-lafs>type src\allmydata\_auto_deps.py
# Note: please minimize imports in this file. In particular, do not import
# any module from Tahoe-LAFS or its dependencies, and do not import any
# modules at all at global level. That includes setuptools and pkg_resources.
# It is ok to import modules from the Python Standard Library if they are
# always available, or the import is protected by try...except ImportError.

install_requires = [
    # we require newer versions of setuptools (actually
    # zetuptoolz) to build, but can handle older versions to run
    "setuptools >= 0.6c6",

    "zfec >= 1.1.0",

    # Feisty has simplejson 1.4
    "simplejson >= 1.4",

    "zope.interface",

    "Twisted >= 9.0.0",

    # foolscap < 0.5.1 had a performance bug which spent
    # O(N**2) CPU for transferring large mutable files
    # of size N.
    # foolscap < 0.6 is incompatible with Twisted 10.2.0.
    # foolscap 0.6.1 quiets a DeprecationWarning.
    "foolscap[secure_connections] >= 0.6.1",

    "Nevow >= 0.6.0",

    # Needed for SFTP. pyasn1 is needed by twisted.conch in Twisted >= 9.0.
    # pycrypto 2.2 doesn't work due to
https://bugs.launchpad.net/pycrypto/+bug/620253
    "pycrypto == 2.0.1, == 2.1.0, >= 2.3",
    "pyasn1 >= 0.0.8a",

    # http://www.voidspace.org.uk/python/mock/
    "mock",

    # Will be needed to test web apps, but not yet. See #1001.
    #"windmill >= 1.3",
]

# Includes some indirect dependencies, but does not include allmydata.
# These are in the order they should be listed by --version, etc.
package_imports = [
    # package name      module name
    ('foolscap',        'foolscap'),
    ('pycryptopp',      'pycryptopp'),
    ('zfec',            'zfec'),
    ('Twisted',         'twisted'),
    ('Nevow',           'nevow'),
    ('zope.interface',  'zope.interface'),
    ('python',          None),
    ('platform',        None),
    ('pyOpenSSL',       'OpenSSL'),
    ('simplejson',      'simplejson'),
    ('pycrypto',        'Crypto'),
    ('pyasn1',          'pyasn1'),
    ('mock',            'mock'),
]

def require_more():
    import platform, sys

    if platform.machine().lower() in ['i386', 'x86_64', 'amd64', 'x86', '']:
        # pycryptopp v0.5.20 fixes bugs in SHA-256 and AES on x86 or amd64
        # (from Crypto++ revisions 470, 471, 480, 492).  The '' is there
        # in case platform.machine is broken and this is actually an x86
        # or amd64 machine.
        install_requires.append("pycryptopp >= 0.5.20")
    else:
        # pycryptopp v0.5.13 had a new bundled version of Crypto++
        # (v5.6.0) and a new bundled version of setuptools (although that
        # shouldn't make any difference to users of pycryptopp).
        install_requires.append("pycryptopp >= 0.5.14")

    # Sqlite comes built into Python >= 2.5, and is provided by the "pysqlite"
    # distribution for Python 2.4.
    try:
        import sqlite3
        sqlite3 # hush pyflakes
        package_imports.append(('sqlite3', 'sqlite3'))
    except ImportError:
        # pysqlite v2.0.5 was shipped in Ubuntu 6.06 LTS "dapper" and
Nexenta NCP 1.
        install_requires.append("pysqlite >= 2.0.5")
        package_imports.append(('pysqlite', 'pysqlite2.dbapi2'))

    # Don't try to get the version number of setuptools in frozen
builds, because
    # that triggers 'site' processing that causes failures. Note that frozen
    # builds still (unfortunately) import pkg_resources in .tac files, so the
    # entry for setuptools in install_requires above isn't conditional.
    if not hasattr(sys, 'frozen'):
        package_imports.append(('setuptools', 'setuptools'))

require_more()

deprecation_messages = [
    "the sha module is deprecated; use the hashlib module instead",
    "object.__new__\(\) takes no parameters",
    "The popen2 module is deprecated.  Use the subprocess module.",
    "the md5 module is deprecated; use hashlib instead",
    "twisted.web.error.NoResource is deprecated since Twisted 9.0.
See twisted.web.resource.NoResource.",
    "the sets module is deprecated",
]

deprecation_imports = [
    'nevow',
    'twisted.persisted.sob',
    'twisted.python.filepath',
    'Crypto.Hash.SHA',
]

C:\tahoe-lafs>


More information about the tahoe-dev mailing list