Giter VIP home page Giter VIP logo

Comments (8)

davidlehn avatar davidlehn commented on July 21, 2024 1

pyld 0.8.1 should fix the requests installation issue.

from cert-issuer.

kimdhamilton avatar kimdhamilton commented on July 21, 2024

I am able to repro; it appears to be an issue in pyld with python 3.6. My best guess is that relative imports (which it's using in init.py) is causing problems.

I have a minimal repro with requirements.txt as follows:

pyld>=0.8.0
requests>=2.18.4

Creating a python 3.6 virtualenv causes this to fail with:

Collecting pyld>=0.8.0 (from -r requirements.txt (line 1))
  Using cached PyLD-0.8.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/y3/91nv4d6n76bfp7zjtnx40wrr0000gn/T/pip-build-bteip65y/pyld/setup.py", line 17, in <module>
        from pyld import jsonld
      File "/private/var/folders/y3/91nv4d6n76bfp7zjtnx40wrr0000gn/T/pip-build-bteip65y/pyld/lib/pyld/__init__.py", line 2, in <module>
        from . import jsonld
      File "/private/var/folders/y3/91nv4d6n76bfp7zjtnx40wrr0000gn/T/pip-build-bteip65y/pyld/lib/pyld/jsonld.py", line 19, in <module>
        import requests
    ModuleNotFoundError: No module named 'requests'

I note that it passes in 2.7 and 3.4 (the other versions I tested).

I'm going to see if there is a way to work around this for python 3.6

from cert-issuer.

kimdhamilton avatar kimdhamilton commented on July 21, 2024

here is a minimal repro in travis: https://travis-ci.org/kimdhamilton/pyld-test/jobs/291439728

from cert-issuer.

kimdhamilton avatar kimdhamilton commented on July 21, 2024

and actually, I think my note on 2.7 and 3.4 is specific to my environment. It seems to fail in all environments when I run in travis, with this project:
https://github.com/kimdhamilton/pyld-test

from cert-issuer.

whchi avatar whchi commented on July 21, 2024

Hi, I've tried some possible ways and finds out that this issue should belongs the library pyld:
https://github.com/digitalbazaar/pyld

I run it's install command pip install PyLD with python 2.7 / python 3+, came out the same error, I'll try another way to do the installation.

Thanks for your help!

from cert-issuer.

kimdhamilton avatar kimdhamilton commented on July 21, 2024

I'm unable to find a good consistent workaround for the pyld issue. The relative import appears to be the root cause, so I forked pyld, switched to absolute imports, and published that package as blockcerts-pyld. I've spent a couple of hours on this, so I'm going to quit while I'm ahead and update the blockcerts stack with this. I'll open an issue on pyld in case they can fix this directly, or have a suggested workaround for consumers.

from cert-issuer.

kimdhamilton avatar kimdhamilton commented on July 21, 2024

Issue has already been filed: digitalbazaar/pyld#68

I added details

from cert-issuer.

kimdhamilton avatar kimdhamilton commented on July 21, 2024

Fixed in pyld. This project build is fixed as of f8147d4

from cert-issuer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.