Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install with pip doesn't work #14

Closed
jmisharp opened this issue Jun 7, 2018 · 4 comments
Closed

Install with pip doesn't work #14

jmisharp opened this issue Jun 7, 2018 · 4 comments

Comments

@jmisharp
Copy link

jmisharp commented Jun 7, 2018

pip3 install httpie-edgegrid

  Downloading https://files.pythonhosted.org/packages/c8/e0/5eac4a04f7fca62dbbf7b302abb2d81676ff132aaf1373ba005b8d5bab80/httpie-edgegrid-1.0.6.tar.gz
Collecting httpie>=0.9.2 (from httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/5a/d9/7c2048e86575ff01d5a1e085d12f0ceef42594d56c6b6905ff87f79cf683/httpie-0.9.9-py2.py3-none-any.whl (74kB)
Collecting edgegrid-python>=1.0.9 (from httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/2f/77/702e98a12a099bd5cd769f1d9c2d6802da409d7fcc8dfdaebea60c49bf19/edgegrid-python-1.1.0.tar.gz
Collecting pyOpenSSL>=0.13 (from httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl (53kB)
Collecting requests>=2.11.0 (from httpie>=0.9.2->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl (88kB)
Collecting Pygments>=2.1.3 (from httpie>=0.9.2->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/02/ee/b6e02dc6529e82b75bb06823ff7d005b141037cb1416b10c6f00fc419dca/Pygments-2.2.0-py2.py3-none-any.whl (841kB)
Collecting ndg-httpsclient (from edgegrid-python>=1.0.9->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/78/60/1458ed478eb5777498ca57f4fabf2cf9328ac43e5f6db7839cf73704f3a6/ndg_httpsclient-0.5.0-py3-none-any.whl
Collecting pyasn1 (from edgegrid-python>=1.0.9->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl (72kB)
Collecting urllib3 (from edgegrid-python>=1.0.9->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB)
Collecting six>=1.5.2 (from pyOpenSSL>=0.13->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting cryptography>=2.2.1 (from pyOpenSSL>=0.13->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz (443kB)
Collecting certifi>=2017.4.17 (from requests>=2.11.0->httpie>=0.9.2->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.11.0->httpie>=0.9.2->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting idna<2.7,>=2.5 (from requests>=2.11.0->httpie>=0.9.2->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)
Collecting asn1crypto>=0.21.0 (from cryptography>=2.2.1->pyOpenSSL>=0.13->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
Collecting cffi>=1.7 (from cryptography>=2.2.1->pyOpenSSL>=0.13->httpie-edgegrid)
  Downloading https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz (438kB)
    Complete output from command python setup.py egg_info:
    
        No working compiler found, or bogus compiler options passed to
        the compiler from Python's standard "distutils" module.  See
        the error messages above.  Likely, the problem is not related
        to CFFI but generic to the setup.py of any Python package that
        tries to compile C code.  (Hints: on OS/X 10.8, for errors about
        -mno-fused-madd see http://stackoverflow.com/questions/22313407/
        Otherwise, see https://wiki.python.org/moin/CompLangPython or
        the IRC channel #python on irc.freenode.net.)
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-_wsvwk_0/cffi/
The command '/bin/sh -c pip3 install httpie-edgegrid' returned a non-zero code: 1```
@jmisharp
Copy link
Author

jmisharp commented Jun 8, 2018

It doesn't say anywhere that Ubuntu should be used when installing the plugin.

For people who would like to run this, as I did, in alpine, you need the following packages - otherwise, you will get the error that I specified above:
apk add --update python3 py3-pip build-base musl python3-dev libffi libffi-dev openssl-dev
pip3 install --upgrade pip cryptography httpie-edgegrid

@webuniverseio
Copy link

Installing with pip on ubuntu on windows (via WSL) also didn't work, but there are no errors:

Installing collected packages: idna, urllib3, certifi, chardet, requests, Pygments, httpie, pyasn1, six, enum34, asn1crypto, pycparser, cffi, ipaddress, cryptography, pyOpenSSL, ndg-httpsclient, edgegrid-python, httpie-edgegrid
Successfully installed Pygments-2.2.0 asn1crypto-0.24.0 certifi-2018.10.15 cffi-1.11.5 chardet-3.0.4 cryptography-2.3.1 edgegrid-python-1.1.1 enum34-1.1.6 httpie-1.0.0 httpie-edgegrid-1.0.6 idna-2.7 ipaddress-1.0.22 ndg-httpsclient-0.5.1 pyOpenSSL-18.0.0 pyasn1-0.4.4 pycparser-2.19 requests-2.20.0 six-1.11.0 urllib3-1.24.1
szarouski@PC:~$ http --auth-type edgegrid -a default: :/diagnostic-tools/v2/ghost-locations/available
usage: http [--json] [--form] [--pretty {all,colors,format,none}]
            [--style STYLE] [--print WHAT] [--headers] [--body] [--verbose]
            [--all] [--history-print WHAT] [--stream] [--output FILE]
            [--download] [--continue]
            [--session SESSION_NAME_OR_PATH | --session-read-only SESSION_NAME_OR_PATH]
            [--auth USER[:PASS]] [--auth-type {basic,digest}]
            [--proxy PROTOCOL:PROXY_URL] [--follow]
            [--max-redirects MAX_REDIRECTS] [--timeout SECONDS]
            [--check-status] [--verify VERIFY]
            [--ssl {ssl2.3,tls1,tls1.1,tls1.2}] [--cert CERT]
            [--cert-key CERT_KEY] [--ignore-stdin] [--help] [--version]
            [--traceback] [--default-scheme DEFAULT_SCHEME] [--debug]
            [METHOD] URL [REQUEST_ITEM [REQUEST_ITEM ...]]
http: error: argument --auth-type/-A: invalid choice: 'edgegrid' (choose from 'basic', 'digest')

Please let me know if I can help to debug this.

@robertolopezlopez
Copy link
Contributor

Working on my ubuntu container as well. @jmisharp , do you need any help or can we close this issue?

image

@robertolopezlopez
Copy link
Contributor

Hi @jmisharp ,

Thank you for taking your time to research a solution for this problem.

Nevertheless:

  • Nowhere in the documentation is stated that Ubuntu is a requirement. Rather I would say, the problem that you encountered were due to the Alpine linux design instead of httpie-edgegrid.
  • If I roll up a new Ubuntu container, I will also have to add some extra dependencies which are not stated anywhere in the documentation:

image
image
image

While we will take for sure your suggestion for future improvements of the project documentation, I will close this issue because as mentioned above your problem is due to alpine linux particularities rather than httpie-edgegrid defects.

Regards,

Roberto

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

No branches or pull requests

3 participants