# Pip install pennylane-lightling GPU error

**URL:** https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603
**Category:** PennyLane Help
**Created:** [May 15, 2024, 2:34am UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603 "2024-05-15T02:34:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Feng\_Xiong](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/feng_xiong/32/1994_2.png) [@Feng\_Xiong](https://discuss.pennylane.ai/u/Feng_Xiong)
#### Post date: [May 15, 2024, 2:34am UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603/1 "2024-05-15T02:34:01Z")

</div>

While installing the pennylane-lightning-gpu==0.33.0 version on the linux system, the below error occurs:

 ![截屏2024-05-15 10.26.05](https://canada1.discourse-cdn.com/flex012/uploads/pennylane/original/2X/0/0ee7bab02aa869f2ca30b91d3f473d6e0bc813dd.png).

I tried to change the version of pennylane-lightning-gpu but the same error still happens.  
Here is my procedure to install pennylane-gpu vesion.  
step 1: pip install cuquantum-python-cu11 (installed successfully)  
step 2: pip install PennyLane-Lightning-GPU==0.33.0 (failed.)

Below is the info of nvidia smi.  
±----------------------------------------------------------------------------+  
| NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0 |  
|-------------------------------±---------------------±---------------------+  
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |  
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |  
| | | MIG M. |  
|===============================+======================+======================|  
| 0 NVIDIA A800 80G… Off | 00000000:CA:00.0 Off | Off |  
| N/A 28C P0 62W / 300W | 1643MiB / 81920MiB | 0% Default |  
| | | Disabled |  
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+  
| Processes: |  
| GPU GI CI PID Type Process name GPU Memory |  
| ID ID Usage |  
|=============================================================================|  
±----------------------------------------------------------------------------+

What should I do to solve this problem?

Thanks for your help.

---

<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: [May 15, 2024, 10:16pm UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603/2 "2024-05-15T22:16:50Z")

</div>

Hi @Feng_Xiong, welcome to the Forum!

Our latest version available of PennyLane and pennylane-lightning-gpu is version 0.36. Are you able to update to this version? You would also need to update custatevec to use CUDA 12.

- Firstly, you can try upgrading the `lightning.gpu` installed package as `python -m pip install pennylane pennylane-lightning pennylane-lightning-gpu --upgrade` to ensure the version is the most recent (v0.36.0 as of writing). Once this is installed and up to date, you can try `pip install custatevec-cu12` to bring in the CUDA 12 variant of the NVIDIA cuQuantum custatevec library.
- `lightning.gpu` requires a CUDA compute capability of SM7.0 or newer (Volta era and newer) to work. This is a hard requirement from the NVIDIA cuQuantum SDK (specifically the custatevec library), as the library expects data-center/HPC grade hardware to run. I cannot tell which GPUs you have installed, but it may be possible they are not supported by the library. You can inspect the compute capabilities for a variety of NVIDIA devices [here](https://developer.nvidia.com/cuda-gpus)

I hope this can help you get running in no time!

---

<div class="post-metadata">

### Author: ![Feng\_Xiong](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/feng_xiong/32/1994_2.png) [@Feng\_Xiong](https://discuss.pennylane.ai/u/Feng_Xiong)
#### Post date: [May 16, 2024, 12:57am UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603/3 "2024-05-16T00:57:30Z")

</div>

Hello Catalina,

I’ve confirmed that “custatevec-cu12” is already installed, but I’m still encountering issues when attempting to install “pennylane-lightning-gpu” using the command “python -m pip install pennylane pennylane-lightning pennylane-lightning-gpu --upgrade.” The error persists as shown in the screenshot below:

 ![截屏2024-05-16 08.48.50](https://canada1.discourse-cdn.com/flex012/uploads/pennylane/original/2X/0/0af8c0e00af94b4c32400c6e657e7cfdc5b8c187.png)

The Nvidia device I’m using is an A800. Based on my experience with successfully running VisionTransformer code using the PyTorch library, I suspect that the installation issue lies with “pennylane-lightning-gpu.”

---

<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: [May 16, 2024, 10:59pm UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603/4 "2024-05-16T22:59:37Z")

</div>

Hi @Feng_Xiong, this looks like version conflicts somewhere.

Would you be able to create a new virtual environment following the instructions in Option 2 in the document below? Once you’ve created a new virtual environment please install PennyLane, Lightning-GPU, and custatevec as I mentioned in my previous post. Please let me know if this fixes your issue! If not you may need to use venv instead of miniconda.

[PennyLane installation instructions - May 2024.pdf](https://discuss.pennylane.ai/uploads/short-url/elW2KS0bqrfBgi28gmTix3ZSzCh.pdf) (82.9 KB)

---

<div class="post-metadata">

### Author: ![mlxd](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/mlxd/32/526_2.png) [@mlxd](https://discuss.pennylane.ai/u/mlxd)
#### Post date: [May 17, 2024, 1:24pm UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603/5 "2024-05-17T13:24:27Z")

</div>

Hi @Feng_Xiong

Looking at your original image, the problem appears to be the local PyPI mirror provided by your university (pip is being redirected to install from [https://pypi.tuna.tsinghua.edu.cn/packages/92/f9/a5b378881af35696ad046f378ce75fd4449d01153a0b58a6d81b2c69213a/](https://pypi.tuna.tsinghua.edu.cn/packages/92/f9/a5b378881af35696ad046f378ce75fd4449d01153a0b58a6d81b2c69213a/) rather than from [PennyLane-Lightning-GPU · PyPI](https://pypi.org/project/PennyLane-Lightning-GPU/)) — it is missing the precompiled LightningGPU wheels. We recommend directly using the wheels provided from [PennyLane-Lightning-GPU · PyPI](https://pypi.org/project/PennyLane-Lightning-GPU/0.36.0/#files) targeting Linux and the version of Python you need, or requesting your university to update the package to include the precompiled wheels.

Hope this helps.

---

<div class="post-metadata">

### Author: ![chirtee](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/chirtee/32/2737_2.png) [@chirtee](https://discuss.pennylane.ai/u/chirtee)
#### Post date: [July 26, 2024, 2:27pm UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603/6 "2024-07-26T14:27:19Z")

</div>

Hi, I am encountering the same issue. Despite using the command `pip install pennylane-lightning-gpu -i https://pypi.org/simple --no-cache-dir`, I continue to receive an error. Furthermore, even after downloading and attempting to install the `pennylane_lightning_gpu-0.37.0.tar.gz` file, the issue persists. Any assistance or guidance on this matter would be greatly appreciated.

---

<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: [July 26, 2024, 7:24pm UTC](https://discuss.pennylane.ai/t/pip-install-pennylane-lightling-gpu-error/4603/7 "2024-07-26T19:24:56Z")

</div>

Hi @chirtee ,

Welcome to the Forum!

What device are you running on? What’s your output for `qml.about()`? And what’s your full error traceback?

In general the recommendation is to first create a new virtual environment and then run:

```auto
pip install pennylane custatevec-cu12 pennylane-lightning-gpu

```

If you’re having trouble with a Miniconda virtual environment you can use venv instead. You can find instructions on how to install PennyLane with venv below.

[PennyLane installation instructions 2024.pdf](https://discuss.pennylane.ai/uploads/short-url/psDp55qw8JT5K6wCgxeR5rqV4fy.pdf) (82.1 KB)

Remember that lightning.gpu only works on NVIDIA GPUs with at least SM 7.0 (Volta and Ampere architectures).
