{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Pydicom offline installer\nIt seems that the pydicom library in kaggle notebooks needs to be updated to read compressed dicom files. This notebook shows how to pre-save the required dependent libraries as datasets. Using this method, dependent libraries can be updated even if Internet access is disabled.","metadata":{}},{"cell_type":"markdown","source":"# Download libraries","metadata":{}},{"cell_type":"code","source":"!pip download -d /kaggle/working pydicom\n!pip download -d /kaggle/working python-gdcm\n!pip download -d /kaggle/working pylibjpeg[all]","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-12-09T20:17:17.167926Z","iopub.execute_input":"2022-12-09T20:17:17.168491Z","iopub.status.idle":"2022-12-09T20:17:36.029358Z","shell.execute_reply.started":"2022-12-09T20:17:17.168387Z","shell.execute_reply":"2022-12-09T20:17:36.02827Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Install libraries\n\nThe following link describes how to read the output of the notebook as a dataset.  \nhttps://www.kaggle.com/docs/notebooks#adding-data-sources\n\nHere is an example of my notebook  \nhttps://www.kaggle.com/code/tmyok1984/rsna-convert-dcm-to-jpg","metadata":{}},{"cell_type":"code","source":"!pip install /kaggle/working/pydicom-2.3.1-py3-none-any.whl","metadata":{"execution":{"iopub.status.busy":"2022-12-09T20:17:36.031605Z","iopub.execute_input":"2022-12-09T20:17:36.032007Z","iopub.status.idle":"2022-12-09T20:17:50.405983Z","shell.execute_reply.started":"2022-12-09T20:17:36.031967Z","shell.execute_reply":"2022-12-09T20:17:50.404883Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Version check","metadata":{}},{"cell_type":"code","source":"import pydicom\nprint(pydicom.__version__)","metadata":{"execution":{"iopub.status.busy":"2022-12-09T20:17:50.407632Z","iopub.execute_input":"2022-12-09T20:17:50.408057Z","iopub.status.idle":"2022-12-09T20:17:50.502326Z","shell.execute_reply.started":"2022-12-09T20:17:50.408016Z","shell.execute_reply":"2022-12-09T20:17:50.501002Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}