MCPcopy Create free account
hub / github.com/cosdata/cosdata / check_dependencies

Function check_dependencies

tests/test-dataset-streaming.py:31–45  ·  view source on GitHub ↗

Check if required dependencies are installed

()

Source from the content-addressed store, hash-verified

29urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
30
31def check_dependencies():
32 """Check if required dependencies are installed"""
33 try:
34 import pyarrow
35 except ImportError:
36 print("Error: pyarrow is required for parquet support.")
37 print("Please install it using: pip install pyarrow")
38 sys.exit(1)
39
40 try:
41 import datasets
42 except ImportError:
43 print("Error: datasets is required for loading Hugging Face datasets.")
44 print("Please install it using: pip install datasets")
45 sys.exit(1)
46
47# Check dependencies at startup
48check_dependencies()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected