Description of problem: error message "no such option: --trusted-host" when installing packages with requirements.txt - python-2.x Version-Release number of selected component (if applicable): devenv_5565 How reproducible: always Steps to Reproduce: 1.create one python-2.x app rhc app create py26 python-2.6 2.edit the requirements.txt with following gunicorn Django==1.6.2 psycopg2 3.git add .; git commit -amp; git push Actual results: remote: Checking for pip dependency listed in requirements.txt file.. remote: remote: Usage: remote: pip install [options] <requirement specifier> ... remote: pip install [options] -r <requirements file> ... remote: pip install [options] [-e] <vcs project url> ... remote: pip install [options] [-e] <local project path> ... remote: pip install [options] <archive url/path> ... remote: remote: no such option: --trusted-host remote: Running setup.py script.. Expected results: no error displayed. packages installed success. Additional info:
trusted host appears to only be valid for the python 3.3 cart which uses a different pip than the other 2.
This was introduced by the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1225291 we should probably add version guards around the adding of the TRUSTED_HOST arg. i'll see if i can get to it tomorrow.
looks like Jakub had already fixed this here: https://github.com/openshift/origin-server/pull/6184 i tested it with 2.6 in a devenv and it's working now.
Verified on the devenv_5569. Log: http://pastebin.test.redhat.com/293910 But there are some warning and syntax error in the log when installing python2.x, Please help to confirm this. remote: Installing collected packages: gunicorn, Django remote: Running setup.py install for gunicorn remote: warning: no previously-included files matching '__pycache__' found under directory '*' remote: warning: no previously-included files matching '*.py[co]' found under directory '*' remote: SyntaxError: ('invalid syntax', ('/var/lib/openshift/5593565b2ca48cece3000060/python/virtenv/lib/python2.6/site-packages/gunicorn/workers/_gaiohttp.py', 68, 26, ' yield from self.wsgi.close()\n')) remote: remote: Installing gunicorn_paster script to /var/lib/openshift/5593565b2ca48cece3000060/python/virtenv/bin remote: Installing gunicorn script to /var/lib/openshift/5593565b2ca48cece3000060/python/virtenv/bin remote: Installing gunicorn_django script to /var/lib/openshift/5593565b2ca48cece3000060/python/virtenv/bin --------------------------------------- remote: Running setup.py install for gunicorn remote: remote: warning: no previously-included files matching '__pycache__' found under directory '*' remote: warning: no previously-included files matching '*.py[co]' found under directory '*' remote: File "/var/lib/openshift/559355292ca48cece3000008/python/virtenv/lib/python2.7/site-packages/gunicorn/workers/_gaiohttp.py", line 68 remote: yield from self.wsgi.close() remote: ^ remote: SyntaxError: invalid syntax remote: remote: Installing gunicorn_paster script to /var/lib/openshift/559355292ca48cece3000008/python/virtenv/bin remote: Installing gunicorn script to /var/lib/openshift/559355292ca48cece3000008/python/virtenv/bin remote: Installing gunicorn_django script to /var/lib/openshift/559355292ca48cece3000008/python/virtenv/bin(In reply to Ben Parees from comment #3) > looks like Jakub had already fixed this here: > https://github.com/openshift/origin-server/pull/6184 > > i tested it with 2.6 in a devenv and it's working now.
Can you mark this verified?
(In reply to Ben Parees from comment #5) > Can you mark this verified? Hi, Ben Guolei mentioned in comment 4 that there's still some syntax error , can you help confirm if that need fix? Thanks
I suspect it's not something we can fix, but i'll let our resident python expert Maciej weigh in.
(In reply to Ben Parees from comment #7) > I suspect it's not something we can fix, but i'll let our resident python > expert Maciej weigh in. Please help to confirm this and I will mark as verified then. Thank you!
Confirming, the error comes from the compilation process of all the *.py files. Since that file is targeted at python >= 3.3 it'll pop-up here. At current time you can safely ignore, and the only thing possible to do is updating pip installation, which in newer versions is ignoring that message [1]. This on the other hand is a limitation of packages we have and I think we cannot pass through atm. I'm ok with closing as is. [1] https://github.com/benoitc/gunicorn/issues/788#issuecomment-92877751
Thank you for the confirmation.