-
Notifications
You must be signed in to change notification settings - Fork 786
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
optional dependencies #103
Comments
@gagb @casperdcl , Yeah, more generally, a lot of these should be optional dependencies. Ideally we would have something like: pip install markitdown[ocr, openai, yt_transcript] Etc. to optionally include some of the more esoteric or heavy dependencies. We can then just include or exclude the converters accordingly. What do you think? |
I like this but there is so much appeal to the simplicity from just running |
Aliases are quite easy to implement...
Pretty common Pythonicity. btw you should probably rename this issue "optional dependencies" or similar. Also you can use a markdown quote block ( |
i think we can just make all the dependencies optional and make the script install dependencies if needed as the way it is happening in ultralytics there if a package is needed it will be installed on runtime also updates also work on runtime |
Whoa at most you could do: try:
import openai
except ImportError as exc:
raise ImportError("please `pip/conda install openai` or `pip install markitdown[llm]`") from exc Meanwhile side-effects like this are highly discouraged: try:
import openai
except ImportError:
os.system(f"{sys.executable} -m pip imstall openai")
import openai |
i think something like
|
Originally posted by @casperdcl in #100 (comment)
The text was updated successfully, but these errors were encountered: