Conditional requirements are broken with wheel #227

Jayin opened this Issue Jun 18, 2014 · 4 comments


None yet
4 participants

Jayin commented Jun 18, 2014

in win7

C:\Users\Lenovo>pip install --upgrade httpie
Requirement already up-to-date: httpie in c:\python27\lib\site-packages
Cleaning up...

Traceback (most recent call last):
  File "C:\Python27\lib\", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\", line 72, in _run_code
    exec code in run_globals
  File "c:\Python27\Scripts\http.exe\", line 5, in <module>
  File "C:\Python27\lib\site-packages\httpie\", line 6, in <module>
    from .core import main
  File "C:\Python27\lib\site-packages\httpie\", line 23, in <module>
    from .downloads import Download
  File "C:\Python27\lib\site-packages\httpie\", line 15, in <module>

    from .output import RawStream
  File "C:\Python27\lib\site-packages\httpie\", line 19, in <module>
    from .models import HTTPRequest, HTTPResponse, Environment
  File "C:\Python27\lib\site-packages\httpie\", line 8, in <module>
    class Environment(object):
  File "C:\Python27\lib\site-packages\httpie\", line 34, in Environment

    from colorama.initialise import wrap_stream
ImportError: No module named colorama.initialise

kjerk commented Jun 18, 2014

Same problem here.
pip install colorama fixed the problem, so probably just needs the dependency added to the install script.

Same here. It's weird that their test doesn't cover this scenario.


jakubroztocil commented Jun 19, 2014

It's a bug, sorry about that. Will be fixed hopefully soon. The same problem will occur with argparse on Python versions that don't included it (2.6, 3.0, 3.1).

It's because the conditional dependencies in don't work with the new wheel format. It looks like with wheel==0.24.0, once released, it will be possible to define environment-specific dependencies again:

    ':python_version == "2.6" or python_version == "3.0" or python_version == "3.1"': [
    ':sys_platform == "win32"': [

But maybe we could drop support for wheel until things improve. The primary reason why It was introduced was to fix #148.

jakubroztocil removed the windows label Jul 29, 2014

jakubroztocil changed the title from ImportError: No module named colorama.initialise to Conditional requirements are broken with wheel Jul 29, 2014


jakubroztocil commented Jan 31, 2015

This should be fixed in HTTPie v0.9.0. See:

#255 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment