How can I install a previous version of DGL? Not find answer on previous discussion

How can I install a previous version of DGL? The documentation says, '# If you have installed dgl-cuXX package, please uninstall it first. pip install dgl -f https://data.dgl.ai/wheels/cu118/repo.html pip install dglgo -f https://data.dgl.ai/wheels-test/repo.html.' By following these steps, the latest version of DGL will be installed. However, I need to install version 1.0.1 of DGL. I have tried ‘pip install dgl=1.0.1 -f https://data.dgl.ai/wheels/cu118/repo.html pip install dglgo -f https://data.dgl.ai/wheels-test/repo.html,’ but running my existing code with this installation gives me the following error:

File “dynamic_pipeline.py”, line 820, in train_wo_prefetch(args, device, g, dataset, model) File “dynamic_pipeline.py”, line 138, in train_wo_prefetch train_dataloader = DataLoader(g, train_idx, sampler, device=device, File “/scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/dataloading/dataloader.py”, line 787, in init self.graph.pin_memory_() File “/scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/heterograph.py”, line 5437, in pin_memory_ self.graph.pin_memory() File “/scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/heterograph_index.py”, line 270, in pin_memory_ return CAPI_DGLHeteroPinMemory(self) File “dgl/_ffi/_cython/./function.pxi”, line 295, in dgl._ffi._cy3.core.FunctionBase.call File “dgl/_ffi/_cython/./function.pxi”, line 227, in dgl._ffi._cy3.core.FuncCall File “dgl/_ffi/_cython/./function.pxi”, line 217, in dgl._ffi._cy3.core.FuncCall3 dgl._ffi.base.DGLError: [04:55:46] /opt/dgl/src/runtime/c_runtime_api.cc:82: Check failed: allow_missing: Device API cuda is not enabled. Please install the CUDA version of DGL.

Stack trace: [bt] (0) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4f) [0x7efdee68470f] [bt] (1) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::DeviceAPIManager::GetAPI(std::string, bool)+0x37c) [0x7efdee93b28c] [bt] (2) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::DeviceAPI::Get(DGLDeviceType, bool)+0x1e3) [0x7efdee935533] [bt] (3) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::NDArray::PinContainer(dgl::runtime::NDArray::Container*)+0x114) [0x7efdee9589a4] [bt] (4) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::NDArray::PinMemory_()+0x16) [0x7efdeeab29b6] [bt] (5) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(dgl::UnitGraph::PinMemory_()+0x161) [0x7efdeeaa31d1] [bt] (6) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(dgl::HeteroGraph::PinMemory_()+0x2e) [0x7efdee9a07fe] [bt] (7) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(+0x443b0f) [0x7efdee9b2b0f] [bt] (8) /scratch/yw8143/dgl_venv/lib/python3.8/site-packages/dgl/libdgl.so(DGLFuncCall+0x48) [0x7efdee93a9b8]

So, I suspect that I encountered an error while installing DGL version 1.0.1. I’m unsure how to resolve this. Can anyone help me?

Could you try

pip install dgl==1.0.1+cu118 -f https://data.dgl.ai/wheels/cu118/repo.html

instead?

yeah thanks for help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.