cloudify-cosmo / wagon

Creates Wheel based archives to allow portable offline installation of Python packages and their dependencies
Apache License 2.0
108 stars 14 forks source link

Wagon install fails --no-binary requires 1 arg #132

Closed rosenjcb closed 4 years ago

rosenjcb commented 4 years ago

So I have this embedded python (from winpython) and I use it because I can't msiexec install python. Installing wagon itself from a .whl is fine but installing any wagon file with the wagon.exe fails. I get this error:

CommandError(pip._internal.exceptions.CommandError: --no-binary / --only-binary option requires 1 argument.)

Any idea why?

geokala commented 4 years ago

We've removed --no-binary from the args, so this issue should not happen with 0.9.1+. Please reopen this if the problem recurs.

rosenjcb commented 4 years ago

@geokala this happens if I try running wagon.exe directly from the Scripts folder. If I try to run it like this: python -m wagon I get this error:

File "C:\Users\us58577\AppData\Local\Continuum\anaconda3\envs\py38\lib\site-packages\wagon.py", line 47, in <module>
    from distro import linux_distribution
ModuleNotFoundError: No module named 'distro'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\me\AppData\Local\Continuum\anaconda3\envs\py38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\me\AppData\Local\Continuum\anaconda3\envs\py38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\me\AppData\Local\Continuum\anaconda3\envs\py38\lib\site-packages\wagon.py", line 49, in <module>
    from platform import linux_distribution
ImportError: cannot import name 'linux_distribution' from 'platform' (C:\Users\me\AppData\Local\Continuum\anaconda3\envs\py38\lib\platform.py)

Obviously, I'm using this on Windows and on version 0.9.1.

tehasdf commented 4 years ago

@rosenjcb please install wagon[dist]; it's still an open question whether we want to make distro be automatically installed on 3.8+, and I'm not sure :/

this is because platform.linux_distribution was deprecated in 3.5 and removed in 3.8; wagon will use distro's impl. If available, and distro is installed optionally, but not automatically (yet). You're right that this just breaks wagon at import-time on 3.8+; linux_distribution is however only called for creating, not for installing wagons (for putting the build distro name in the metadata file)

the same issue was present in wagon 0.7, and we didn't fix it yet for 0.9/1.0, but it's of course unrelated to --no-binary and wheel args

tehasdf commented 4 years ago

@rosenjcb I've pushed #135 and published wagon 0.9.2, which now should not require distro/platform at import time. You will still need it for creating/repairing (not installing) wagons, and there is a message telling you to install distro if you don't have it.

Still open as to whether we want distro be a hard requirement; I'm iffy on that because I like how currently wagon has no requirements.

(i guess it has wheel)