Coder Social home page Coder Social logo

Comments (5)

HaIDsIEx avatar HaIDsIEx commented on May 18, 2024 1

Hey, thanks for the fast response! I just made a new environment and tried to set up everything. However, (even if the package gets downloaded into the "package"-folder) I get following error:

Traceback (most recent call last):
  File "{path}/function.py", line 1, in <module>
    from package import trafilatura
  File "{path}\package\trafilatura\__init__.py", line 16, in <module>
    from .core import extract, process_record
  File "{path}\package\trafilatura\core.py", line 16, in <module>
    from lxml import etree, html
ModuleNotFoundError: No module named 'lxml'

from trafilatura.

HaIDsIEx avatar HaIDsIEx commented on May 18, 2024 1

Afaik, lxml needs to be compiled and installed for each machine. Therefore, „portable“ compatibility (install it to a folder and copy it anywhere and run it) can’t be achieved with lxml. In my case I would like to push it on AWS Lambda (localstack; can't install things easily there). I guess it won’t work as long as this project builds on lxml. However, I already found some alternatives for now (I expose your project via a REST-Service on my machine for development purposes). Later (on AWS) I should be able to use EC2 to install all necessary packages such as lxml.

from trafilatura.

adbar avatar adbar commented on May 18, 2024

Thank you, it was indeed a problem, I fixed it in 1a57635, could you please confirm by trying the version straight from the repository? (pip install -U git+https://github.com/adbar/trafilatura.git with your --target)

from trafilatura.

adbar avatar adbar commented on May 18, 2024

from trafilatura.

adbar avatar adbar commented on May 18, 2024

Hi @HaIDsIEx, please refer to this answer and this code snippet, both show how to solve the issue with LXML.

from trafilatura.

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.