pip install asyncio fails

1,840 views
Skip to first unread message

Jonas Gröger

unread,
Feb 20, 2014, 5:36:30 PM2/20/14
to python...@googlegroups.com
Hello!

I am trying to install asyncio aka tulip on Python 3.3 like this

pip install asyncio

This fails:

Downloading/unpacking asyncio
  Running setup.py (path:c:\users\jonas\appdata\local\temp\pip_build_Jonas\asyncio\setup.py) egg_info for package asyncio
    
Installing collected packages: asyncio
  Running setup.py install for asyncio
    building 'asyncio._overlapped' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\jonas\appdata\local\temp\pip_build_Jonas\asyncio\setup.py", line 32, in <module>
        ext_modules=extensions,
      File "C:\Python33\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Python33\lib\distutils\dist.py", line 929, in run_commands
        self.run_command(cmd)
      File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
        cmd_obj.run()
      File "C:\Python33\lib\site-packages\setuptools\command\install.py", line 54, in run
        return _install.run(self)
      File "C:\Python33\lib\distutils\command\install.py", line 569, in run
        self.run_command('build')
      File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
        cmd_obj.run()
      File "C:\Python33\lib\distutils\command\build.py", line 126, in run
        self.run_command(cmd_name)
      File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
        cmd_obj.run()
      File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", line 52, in run
        _build_ext.run(self)
      File "C:\Python33\lib\distutils\command\build_ext.py", line 353, in run
        self.build_extensions()
      File "C:\Python33\lib\distutils\command\build_ext.py", line 462, in build_extensions
        self.build_extension(ext)
      File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", line 186, in build_extension
        _build_ext.build_extension(self,ext)
      File "C:\Python33\lib\distutils\command\build_ext.py", line 517, in build_extension
        depends=ext.depends)
      File "C:\Python33\lib\distutils\msvc9compiler.py", line 460, in compile
        self.initialize()
      File "C:\Python33\lib\distutils\msvc9compiler.py", line 371, in initialize
        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "C:\Python33\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
        raise ValueError(str(list(result.keys())))
    ValueError: ['path']
    Complete output from command C:\Python33\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\jonas\\appdata\\local\\temp\\pip_build_Jonas\\asyncio\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\jonas\appdata\local\temp\pip-39a8x9-record\install-record.txt --single-version-externally-managed --compile:
    running install

running build
running build_py
creating build
creating build\lib.win-amd64-3.3
creating build\lib.win-amd64-3.3\asyncio
copying asyncio\base_events.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\base_subprocess.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\constants.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\events.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\futures.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\locks.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\log.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\proactor_events.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\protocols.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\queues.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\selectors.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\selector_events.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\streams.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\subprocess.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\tasks.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\test_utils.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\transports.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\unix_events.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\windows_events.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\windows_utils.py -> build\lib.win-amd64-3.3\asyncio
copying asyncio\__init__.py -> build\lib.win-amd64-3.3\asyncio
running build_ext
building 'asyncio._overlapped' extension
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\jonas\appdata\local\temp\pip_build_Jonas\asyncio\setup.py", line 32, in <module>
    ext_modules=extensions,
  File "C:\Python33\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Python33\lib\distutils\dist.py", line 929, in run_commands
    self.run_command(cmd)
  File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
    cmd_obj.run()
  File "C:\Python33\lib\site-packages\setuptools\command\install.py", line 54, in run
    return _install.run(self)
  File "C:\Python33\lib\distutils\command\install.py", line 569, in run
    self.run_command('build')
  File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
    cmd_obj.run()
  File "C:\Python33\lib\distutils\command\build.py", line 126, in run
    self.run_command(cmd_name)
  File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
    cmd_obj.run()
  File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", line 52, in run
    _build_ext.run(self)
  File "C:\Python33\lib\distutils\command\build_ext.py", line 353, in run
    self.build_extensions()
  File "C:\Python33\lib\distutils\command\build_ext.py", line 462, in build_extensions
    self.build_extension(ext)
  File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", line 186, in build_extension
    _build_ext.build_extension(self,ext)
  File "C:\Python33\lib\distutils\command\build_ext.py", line 517, in build_extension
    depends=ext.depends)
  File "C:\Python33\lib\distutils\msvc9compiler.py", line 460, in compile
    self.initialize()
  File "C:\Python33\lib\distutils\msvc9compiler.py", line 371, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python33\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: ['path']

----------------------------------------
Cleaning up...
Command C:\Python33\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\jonas\\appdata\\local\\temp\\pip_build_Jonas\\asyncio\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\jonas\appdata\local\temp\pip-39a8x9-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\jonas\appdata\local\temp\pip_build_Jonas\asyncio
Storing debug log for failure in C:\Users\Jonas\pip\pip.log

How can I make this work?

Best,
Jonas 

Guido van Rossum

unread,
Feb 21, 2014, 4:12:49 PM2/21/14
to Jonas Gröger, python-tulip
Hi Jonas,

It looks like nobody can help you. There are many potential issues that could break pip on Windows. Maybe you can search or ask on StackOverflow.com? (I hesitate to recommend that you install from source, because you'd need to have VS 2010 for that -- a free version is available but it's still a pain to set up.)
--
--Guido van Rossum (python.org/~guido)

Jonas Gröger

unread,
Feb 21, 2014, 4:26:50 PM2/21/14
to python...@googlegroups.com, Jonas Gröger, gu...@python.org
Hi Guido,

First of all thank you for your answer. Unfortunately, the Unofficial Windows Binaries for Python Extension Packages from Christoph Gohlke do not contain asyncio for Python 3.3 (they actually don't at all). Unfortunately he does not point out how exactly he builds the Installers.

As I need this, I am fine building from source. I also have a little background in C++. Could you point me to a resource where it is explained how to do that?

-- Jonas Gröger

Donald Stufft

unread,
Feb 21, 2014, 4:31:55 PM2/21/14
to Jonas Gröger, python-tulip, Guido van Rossum
Sorry I didn’t notice this.

It was actually trying to install from source, and an error occurred when it tried to compile it. Do you have the proper toolchain installed? (e.g. can you install anything that requires a C ext?)

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

signature.asc

Guido van Rossum

unread,
Feb 21, 2014, 4:36:20 PM2/21/14
to Donald Stufft, Jonas Gröger, python-tulip
But why would it install from source? I put a wheel distro on PyPI: see https://pypi.python.org/pypi/asyncio/0.3.1

Jonas, you might be able to just download the wheel from there and do whatever it is one does to a wheel to install it.

Jonas Gröger

unread,
Feb 21, 2014, 4:37:38 PM2/21/14
to python...@googlegroups.com, Jonas Gröger, Guido van Rossum
I am not sure. I have Visual Studio 2010 installed and set the environment variable

VS100COMNTOOLS = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools"

Is there more to it?

-- Jonas 

Donald Stufft

unread,
Feb 21, 2014, 4:39:31 PM2/21/14
to Guido van Rossum, Jonas Gröger, python-tulip
If your pip is older than 1.5 it won’t install Wheels by default, if it’s older than 1.4 it can’t install them at all.
signature.asc

Victor Stinner

unread,
Feb 21, 2014, 4:41:31 PM2/21/14
to Guido van Rossum, Jonas Gröger, python-tulip
Hi,

2014-02-21 22:12 GMT+01:00 Guido van Rossum <gu...@python.org>:
> It looks like nobody can help you. There are many potential issues that
> could break pip on Windows. Maybe you can search or ask on
> StackOverflow.com? (I hesitate to recommend that you install from source,
> because you'd need to have VS 2010 for that -- a free version is available
> but it's still a pain to set up.)

I played a lot with Visual Studio Express. It's difficult to find it
on the website, the installer download more than 400 MB, it installs a
.NET framework, etc. More annoying point: Visual Studio Express cannot
compile in 64-bit mode, it's limited to 32-bit.

It's much easier to install the Windows SDK: it includes a C compiler,
it's easy to find it, it supports 64-bit, it's enough to compile
Python extensions. See my notes:
http://haypo-notes.readthedocs.org/misc.html#compile-python-extensions-on-windows

Victor

Donald Stufft

unread,
Feb 21, 2014, 4:41:50 PM2/21/14
to Jonas Gröger, python-tulip, Guido van Rossum
I don’t use Windows so I don’t know how exactly to get the compiler toolchain on there except by futzing around until it works :(
signature.asc

Jonas Gröger

unread,
Feb 21, 2014, 5:15:17 PM2/21/14
to python...@googlegroups.com, Guido van Rossum, Jonas Gröger
Doesn't pip automatically favor the wheels distribution over the source distribution? The documentations says so. Because clearly, even though there is a wheels distribution available, pip install asyncio still fails with


Is the wheels archive broken or why does it still want to build from source?

-- Jonas

Donald Stufft

unread,
Feb 21, 2014, 5:17:59 PM2/21/14
to Jonas Gröger, python-tulip, Guido van Rossum
Are you using a 64bit Python?
signature.asc

Jonas Gröger

unread,
Feb 21, 2014, 5:24:33 PM2/21/14
to python...@googlegroups.com, Jonas Gröger, Guido van Rossum
Oh yes. Totally forgot to mention that. That might be the reason pip wants to build from source. Any update on the 64-bit version?

Offtopic: Not every package author is always putting up the package in the right format / the right version. That is why I want to learn how to package them so that I am not dependent on others. Is there some resource you can point me to aside from Victor Stinners?

Donald Stufft

unread,
Feb 21, 2014, 5:41:38 PM2/21/14
to Jonas Gröger, python-tulip, Guido van Rossum
On Feb 21, 2014, at 5:24 PM, Jonas Gröger <jonas....@gmail.com> wrote:

Oh yes. Totally forgot to mention that. That might be the reason pip wants to build from source. Any update on the 64-bit version?

Ok yea, the Wheel uploaded is only a 32bit wheel so it’s not binary compatible with a 64bit CPython.
signature.asc

Paul Moore

unread,
Feb 26, 2014, 2:17:58 PM2/26/14
to python...@googlegroups.com, Jonas Gröger, Guido van Rossum
On Friday, 21 February 2014 22:24:33 UTC, Jonas Gröger wrote:
Oh yes. Totally forgot to mention that. That might be the reason pip wants to build from source. Any update on the 64-bit version?

Offtopic: Not every package author is always putting up the package in the right format / the right version. That is why I want to learn how to package them so that I am not dependent on others. Is there some resource you can point me to aside from Victor Stinners?


I have a 64-bit Windows wheel of asyncio built for Python 3.3. The link is https://www.dropbox.com/s/va35r5qca6dqcgd/asyncio-0.4.1-cp33-none-win_amd64.whl (assuming I got setting up a public link in Dropbox right - let me know if it doesn't work!)

If you can verify it looks OK, Guido might be able to get it added to the PyPI downloads. You might be able to pip install direct from the link, if not you can download it manually and do the pip install as "pip install asyncio-0.4.1-cp33-none-win_amd64.whl".

Paul
Reply all
Reply to author
Forward
0 new messages