# Pennylane-Lightning GPU

**URL:** <https://discuss.pennylane.ai/t/pennylane-lightning-gpu/2432>\
**Category:** PennyLane Lightning\
**Created:** [January 12, 2023, 10:07am UTC](https://discuss.pennylane.ai/t/pennylane-lightning-gpu/2432 "2023-01-12T10:07:50Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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 23, 2023, 5:07pm UTC](https://discuss.pennylane.ai/t/pennylane-lightning-gpu/2432/10 "2023-05-23T17:07:42Z")

</div>

Hi @George_LA and @mass_of_15

To better help with this issue, it would be a big help to have an end-to-end example that is directly runnable as a python file. While I understand it can be a challenge when these issues pop up, if we can do `python your_file.py` on a given script that throws the error, we can more easily examine the source of the issue. Since the earlier example with `lightning.gpu` doesn’t attempt to run any code, and just set’s up the problem I am unable to reproduce it locally.

If the earlier example is what is causing the issue for you, after defining the device, can I suggest you ensure you have no additional directories at the path you are running the code — in this instance, running PennyLane code without directories named `pennylane` `pennylane-lightning` or `pennnylane-lightning-gpu`, as they can interfere with the Python package resolution. If you have this structure, you can try this with `python -I my_script.py` which tells the Python environment to ignore all current and user site-packages (see [here](https://docs.python.org/3/using/cmdline.html#cmdoption-I) for more info).

If that fails, can you output the following so that we can see the binaries are correctly installed:

```bash
ls $(python -c "import os; import pennylane_lightning as pll; print(os.path.dirname(pll. __file__ ))")
ls $(python -c "import os; import pennylane_lightning_gpu as plg; print(os.path.dirname(plg. __file__ ))")
echo $PYTHONPATH

```

Also, please ensure that cuquantum is installed with the corresponding CUDA 11.x version. You can force this via `python -m pip install custatevec-cu11`.

Lastly, to ensure no issues occur due to cross-contamination of other environments, it is always best to start all experiments from a fresh Python env, as different versions can cause issues.

Feel free to let us know if any of the above helps.

---

_[View the full topic](https://discuss.pennylane.ai/t/pennylane-lightning-gpu/2432)._
