# Problem when installing "lightning.gpu"

**URL:** <https://discuss.pennylane.ai/t/problem-when-installing-lightning-gpu/3746>\
**Category:** PennyLane Help\
**Created:** [November 28, 2023, 11:19pm UTC](https://discuss.pennylane.ai/t/problem-when-installing-lightning-gpu/3746 "2023-11-28T23:19:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bach\_Bao](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/bach_bao/32/2135_2.png) [@Bach\_Bao](https://discuss.pennylane.ai/u/Bach_Bao)\
**Post date:** [November 28, 2023, 11:19pm UTC](https://discuss.pennylane.ai/t/problem-when-installing-lightning-gpu/3746/1 "2023-11-28T23:19:29Z")

</div>

Hi, I have a question about the installation of “lightning.gpu”, here is my error why trying to use “lightning.gpu”

```auto
import pennylane as qml
dev = qml.device('lightning.gpu', wires=4)

```

The error message is shown below:

```auto
/work/acslab/users/anaconda3/envs/torchcuda/lib/python3.11/site-packages/pennylane_lightning/lightning_gpu/lightning_gpu.py:76: UserWarning: libcublas.so.11: cannot open shared object file: No such file or directory
  warn(str(e), UserWarning)
/work/acslab/users/baobach/anaconda3/envs/torchcuda/lib/python3.11/site-packages/pennylane_lightning/lightning_gpu/lightning_gpu.py:958: UserWarning: 
                "Pre-compiled binaries for lightning.gpu are not available. Falling back to "
                "using the Python-based default.qubit implementation. To manually compile from "
                "source, follow the instructions at "
                "https://pennylane-lightning.readthedocs.io/en/latest/installation.html.",
            
  warn(

```

I have tried “–force-reinstall --no-cache-dir” for penny lane, penny lane-lightning[gpu] and cuquantum-python but it is not working.  
Here is my cuda version

```auto
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0

```

and the version of my package:

```auto
Name: PennyLane
Version: 0.33.1
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
Home-page: https://github.com/PennyLaneAI/pennylane
Author: 
Author-email: 
License: Apache License 2.0
Location: /work/acslab/users/baobach/anaconda3/envs/torchcuda/lib/python3.11/site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane-Lightning, PennyLane-Lightning-GPU

Platform info: Linux-3.10.0-957.27.2.el7.x86_64-x86_64-with-glibc2.17
Python version: 3.11.5
Numpy version: 1.26.2
Scipy version: 1.11.4
Installed devices:
- default.gaussian (PennyLane-0.33.1)
- default.mixed (PennyLane-0.33.1)
- default.qubit (PennyLane-0.33.1)
- default.qubit.autograd (PennyLane-0.33.1)
- default.qubit.jax (PennyLane-0.33.1)
- default.qubit.legacy (PennyLane-0.33.1)
- default.qubit.tf (PennyLane-0.33.1)
- default.qubit.torch (PennyLane-0.33.1)
- default.qutrit (PennyLane-0.33.1)
- null.qubit (PennyLane-0.33.1)
- lightning.qubit (PennyLane-Lightning-0.33.1)
- lightning.gpu (PennyLane-Lightning-GPU-0.33.1)

```

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [November 29, 2023, 4:15am UTC](https://discuss.pennylane.ai/t/problem-when-installing-lightning-gpu/3746/2 "2023-11-29T04:15:05Z")

</div>

Hi @Bach_Bao, welcome to the Forum!

I think you might be missing custatevec, which is an NVIDIA library, and the CUDA version is too high.  
I would recommend creating a new virtual environment and running the following:

```auto
python -m pip install pennylane custatevec-cu11 pennylane-lightning-gpu

```

Also, note that `lightning.gpu` requires a CUDA compute capability of SM7.0 or newer (Volta era and newer), so make sure that your GPU is compatible. You can find more details in the answer by mlxd [here](https://discuss.pennylane.ai/t/issues-installing-and-running-pennylane-lightning-gpu/3612/2).

Let me know if this solves your issue!

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [November 29, 2023, 4:17am UTC](https://discuss.pennylane.ai/t/problem-when-installing-lightning-gpu/3746/3 "2023-11-29T04:17:03Z")

</div>

By the way, we have a very small survey for [PennyLane v0.33](https://bit.ly/PennyLane-v033-survey), and it would be awesome if you’d give us some feedback and tell us about your needs. Thank you! 😁
