Code Monkey home page Code Monkey logo

Comments (8)

JustUser1410 avatar JustUser1410 commented on July 26, 2024

If you are using conda environment on Windows, make sure you have GTK3 installed before you install the rest of the requirements:

conda install -c conda-forge gtk3

from gpt-researcher.

sonicviz avatar sonicviz commented on July 26, 2024

I'm not using conda, I'm using a straight VSCode git clone with .venv for pip install requirements.txt
I'd rather KISS.

Is there any way to get it working properly using this most basic of all setups, which is what the install instructions advise as well? There's nothing about needing GTK in there afaik. Not sure what it has to do with styling of the output in a browser anyway?

from gpt-researcher.

JustUser1410 avatar JustUser1410 commented on July 26, 2024

It has something top do with the fact that WaesyPrint requires GTK3 and that cannot be installed using pip.
If you are not using conda, then simply installing GTK3 before installing requirements should do the trick.

To find out "why" you would have to dig into WeasyPrint source.
Here is a good start: Kozea/WeasyPrint#2011 (comment)

Using anaconda is pretty basic:
conda create --name myenv python=3.11
conda activate myenv
conda install -c conda-forge gtk3

and then just continue from step_1 of the installation instructions.

Once environment is setup, just select that Python interpreter for your project in VSCode.

from gpt-researcher.

sonicviz avatar sonicviz commented on July 26, 2024

Okay, thanks for the info.

@assafelovic Any thoughts? Could you adjust the installation documentation to reflect this?

Even better, replace WeasyPrint due to the GTK dependency and hassle installing it on Windows.
Is there a simpler yet functional replacement?

from gpt-researcher.

assafelovic avatar assafelovic commented on July 26, 2024

Hey @sonicviz I've been looking for a decent Markdown->PDF library without any success. This is why I've decided to include it for users who can get it working instead of removing completely. The service still runs but there's an issue with the PDF right?

from gpt-researcher.

sonicviz avatar sonicviz commented on July 26, 2024

Well, there two issues here, perhaps I should have done them separately.

  1. The pdf issue with the error: Error in converting Markdown to PDF: cannot load library 'gobject-2.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
  2. The output text has a lot of styling issues, which must be due to the WaesyPrint issue mentioned above.

I can get by without the pdf as I use the word export, and it's about 95% ok, just some of the bulleted lists seem to have an extra carriage return at the start of the sentence. The bigger issue is the text in the browser window is much worse, nowhere near what it looks like in Docker on on the cloud version. Pretty unreadable, much worse than the word export.

Does that make sense?

from gpt-researcher.

assafelovic avatar assafelovic commented on July 26, 2024

can you please attach a screenshot of how it looks like?

from gpt-researcher.

sonicviz avatar sonicviz commented on July 26, 2024

Sure. This is messy, not how it looks on the Cloud or Docker.
image

from gpt-researcher.

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.