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

ImportError: cannot import name 'MegaParse' from 'megaparse' #96

Open
zhenwenYANG opened this issue Nov 1, 2024 · 7 comments
Open

ImportError: cannot import name 'MegaParse' from 'megaparse' #96

zhenwenYANG opened this issue Nov 1, 2024 · 7 comments

Comments

@zhenwenYANG
Copy link

When I used this model after your commit, it reminds me of this information,how can i solve it?

@chloedia
Copy link
Collaborator

chloedia commented Nov 1, 2024

Hi, we are re organizing the repo, big changes happening !
If you want to use MegaParse you need to do : from megaparse.core.megaparse import MegaParse, it will be back working using from megaparse import MegaParse soon.

@trbielec
Copy link

trbielec commented Dec 4, 2024

Should update the readme if this is still the case.

Here's what worked for me on MacOS:

from megaparse.core.megaparse import MegaParse
from megaparse.core.parser.unstructured_parser import UnstructuredParser

# Initialize the parser
parser = UnstructuredParser()
megaparse = MegaParse(parser)

# Load a document
response = megaparse.load("./test.pdf")

# Save the parsed content to a Markdown file
megaparse.save("./test.md")
pip install megaparse
pip install httpx    
pip install langchain_core
pip install unstructured  
pip install llama_parse
pip install "unstructured[pdf]"
brew install poppler  

@StanGirard
Copy link
Contributor

Or you can use version 3.11 of python. #158 explains why

@sdpolke
Copy link

sdpolke commented Dec 6, 2024

None of the suggestions working for me . #158 as well.

Device : M3 Pro
OS : Sonoma

Tried with Python 3.12,3.11

@Adriansdls
Copy link

@sdpolke try python 3.11.9 and force megaparse==0.0.48. If you have problems with pillow-heif install first libheif with brew (brew install libheif) and if you have problems with pikepdf install qpdf with brew first.

@sdpolke
Copy link

sdpolke commented Dec 10, 2024

@sdpolke try python 3.11.9 and force megaparse==0.0.48. If you have problems with pillow-heif install first libheif with brew (brew install libheif) and if you have problems with pikepdf install qpdf with brew first.

THanks ! Will try this out.

@Wichai-pan
Copy link

Still cannot work. Can you update the installation documentation with more details (more friendly to beginners)?

Hi, we are re organizing the repo, big changes happening !嗨,我们正在重新组织存储库,发生了很大的变化! If you want to use MegaParse you need to do : from megaparse.core.megaparse import MegaParse, it will be back working using from megaparse import MegaParse soon.如果您想使用 MegaParse,您需要执行: from megaparse.core.megaparse import MegaParse ,它将很快恢复使用 from megaparse import MegaParse

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

No branches or pull requests

7 participants