Check if required dependencies are installed
()
| 29 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
| 30 | |
| 31 | def 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 |
| 48 | check_dependencies() |
no outgoing calls
no test coverage detected