Failure when installing from pypi
Closed this issue · 8 comments
I'm running into an issue when installing from pypi.
If I run pip install --user antidote==0.7.0
and then run my script I get the following output:
publish-message -t high-priority -f bin/examples/predict.json
Traceback (most recent call last): File "/home/language-assessment/.local/bin/publish-message", line 5, in <module>
from aerogel.cli import publish_message File "/home/language-assessment/.local/lib/python3.5/site-packages/aerogel/cli.py", line 19, in <module>
def log_message(logger: Logger, message, level): File "/home/language-assessment/.local/lib/python3.5/site-packages/click/decorators.py", line 173, in decorator
_param_memo(f, OptionClass(param_decls, **option_attrs)) File "/home/language-assessment/.local/lib/python3.5/site-packages/click/decorators.py", line 135, in _param_memo
f.__click_params__ = []AttributeError: 'antidote._internal.wrapper.InjectedWrapper' object has no attribute '__click_params__'
If I install using pip install --user --no-cache-dir git+https://github.com/Finistere/antidote.git@v0.7.0#egg=antidote
it works fine.
If I use the pypi install but delete all the *.so
files in the package directory, then it works again just fine. Is it possible something went wrong with the publication of this package?
Happy to help provide any additional information you need. Thanks!
Sorry totally missed your issue, taking a look on it today !
From a quick check, it should work if you use:
pip install --no-binary --user antidote==0.7.0
The issue you have comes from the fact that click
wants to add attributes to the function wrapper of Antidote. While it works with the pure Python version of Antidote (the one you're installing manually, as you probably don't have Cython in you environment), it doesn't with the Cython one. The option --no-binary
tells pip not to use any of the pre-compiled wheels which all come from the Cython version. I'll checkout how to fix it later today. :)
It should be fixed with the v0.7.2
. Let me know if you have any other issues. :)
Sorry it took me a while to confirm, but I did verify this resolved my issue. Thank you so much!
I'm sorry for the false hope, but I may have spoken too soon.
When I tested this earlier this morning, it was on an alpine docker image. Alpine doesn't match your manylinux2014 wheel requirement, and so I overlooked the fact that it was still using a source distribution.
I later tested this on my local arch machine and realized I am still getting an error. The response is different than before which is very interesting. When I run the command I had included in the original issue, I now get:
➜ publish-message -t high-priority -f bin/examples/predict.json
Usage: publish-message [OPTIONS]
Try 'publish-message --help' for help.
Error: no such option: -t
The publish-message command proxies to this method signature:
@click.command()
@click.option('-t', '--to', default='', help='Destination for message')
@click.option('-m', '--message', default='', help='Message to publish')
@click.option('-f', '--file', 'message_file', type=click.File('r'), default=None,
help='Path to file containing message to publish')
@click.option('-n', '--number', 'number', type=int, default=1, help='Repeat message n times.')
@inject
def publish_message(publisher: Publisher, logger: Logger, to, message, message_file=None, number=1):
Once again, I can confirm that if I install 0.7.2 from source, it works perfectly. It is only a problem with the wheel installation.
Let me know if there is more information I can provide you, or if I can help troubleshoot in any other way.
Hum, interesting. There is another issue then. Will take a look, thanks !
It should be fixed with the 0.7.3
. The issue was that deleting attributes of the wrapper wasn't supported in the Cython version.
Looks like that resolved it!
I have to say, I'm consistently impressed with your response time. Thank you again for such a wonderful project and commitment to open source.