Код: Выделить всё
OSError: Can't read data (can't open directory: /opt/conda/envs/AE4353/lib/hdf5/plugin)
Код: Выделить всё
def load_h5_file(h5_file_path):
with h5py.File(h5_file_path, "r") as file:
images = file["images"][:]
targets = file["targets"][:]
Images = torch.tensor(images)
Targets = torch.tensor(targets)
return Images, Targets
load_h5_file(h5_file_path)
Код: Выделить всё
(AE4353_user_env) vscode ➜ /workspaces/AE4353-Y24 (main) $ conda install -c conda-forge hdf5-plugin
Channels:
- conda-forge
- defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- hdf5-plugin
Current channels:
- https://conda.anaconda.org/conda-forge
- defaults
To search for alternate channels that may provide the conda package you're
looking for, navigate to https://anaconda.org and use the search bar at the top of the page.
Код: Выделить всё
Requirement already satisfied: h5py[hdf5plugin] in /home/kibangadas/.local/lib/python3.8/site-packages (3.11.0)
WARNING: h5py 3.11.0 does not provide the extra 'hdf5plugin'
Requirement already satisfied: numpy>=1.17.3 in /home/kibangadas/.local/lib/python3.8/site-packages (from h5py[hdf5plugin]) (1.24.4)
Код: Выделить всё
Collecting hdf5plugin
Downloading hdf5plugin-5.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (45.6 MB)
|████████████████████████████████| 45.6 MB 14.1 MB/s
Requirement already satisfied: h5py>=3.0.0 in /home/kibangadas/.local/lib/python3.8/site-packages (from hdf5plugin) (3.11.0)
Requirement already satisfied: numpy>=1.17.3 in /home/kibangadas/.local/lib/python3.8/site-packages (from h5py>=3.0.0->hdf5plugin) (1.24.4)
Installing collected packages: hdf5plugin
Successfully installed hdf5plugin-5.0.0
Подробнее здесь: https://stackoverflow.com/questions/790 ... om-h5-file