Error when calling device()

When I tried to install…
ERROR: Command errored out with exit status 1: python egg_info Check the logs for full command output.

Hey @Amandeep,

Would you mind posting the full error message, including traceback? Such an error can arise from other dependencies missing on your system, which is impossible to guess without more information.


ERROR: Command errored out with exit status 1:
command: ‘C:\Users\HP\anaconda3\python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\HP\AppData\Local\Temp\pip-install-zgzbc20p\pyscf\’"’"’; file=’"’"‘C:\Users\HP\AppData\Local\Temp\pip-install-zgzbc20p\pyscf\’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base ‘C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-rl8jl_nz’
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-zgzbc20p\pyscf
Complete output (9 lines):
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\HP\AppData\Local\Temp\pip-install-zgzbc20p\pyscf\”, line 206, in
blas_path_guess = [search_lib_path(‘lib’+x+so_ext, blas_lib_dir)
File “C:\Users\HP\AppData\Local\Temp\pip-install-zgzbc20p\pyscf\”, line 206, in
blas_path_guess = [search_lib_path(‘lib’+x+so_ext, blas_lib_dir)
File “C:\Users\HP\AppData\Local\Temp\pip-install-zgzbc20p\pyscf\”, line 148, in search_lib_path
paths = os.environ.get(LD_LIBRARY_PATH, ‘’).split(os.pathsep)
NameError: name ‘LD_LIBRARY_PATH’ is not defined
ERROR: Command errored out with exit status 1: python egg_info Check the logs for full command output.

Thank you for you prompt reply @Maria_Schuld

Hi @Amandeep, thanks for the detailed error message!

The issue here is that one of the dependencies of PennyLane-Qiskit, pyscf, does not support Windows.

The latest version of the plugin removes this dependency; you can install it directly from GitHub:

pip install git+

Alternatively, we will be releasing the fixed version of the PennyLane Qiskit plugin tomorrow, so by tomorrow the standard pip installation should work!

I am not able to install directly from the given link :frowning:

@Amandeep, would you mind trying tomorrow (after the pennylane-qiskit plugin release of version 0.12.0) once more using the standard pip installation and reporting if this solves the issue?

If you would like to install from the git link, an error message may help us to understand why you’re not able to do that. There is also the “pro” strategy of cloning the github repository and installing from there, but I suggest the usual pip install is more straight forward in your case!

Okay Thanks @Maria_Schuld. I will wait and will try to do with usual pip install

Whenever the standard pip installation starts working, please let me know.

Could you please tell me how to get autocomplete while typing commands in PennyLane? any command specific for it

Dear @Amandeep,

If you mean the feature of getting suggestions of available functions and methods when you start typing in your editor, this is not a feature of any programming language, but the editor itself. For example, if you use PyCharm and import pennylane, the IDE in which you code should offer autocompletion:


Yeah!! Its working now. Although, I stuck to the previous issue and waiting for pip installation to work today.

Hey @Amandeep, PennyLane-Qiskit version 0.12 is released! Please try installing again with pip install pennylane-qiskit (remove the old version before installing, just to make sure) and let us know if your problem is solved!

Thank you much :slight_smile: @Maria_Schuld.
I uninstalled previous one and installed latest version. Now, it working fine. Thank you for solving it.

1 Like

Hello guys, I have met same problem recently on Colab. I also met DeviceError:

raise DeviceError(“Device does not exist. Make sure the required plugin is installed.”)

Here is my code on Colab:

!pip install pennylane pennylane-qiskit
import pennylane as qml

And here is the result, I found that my “Installed devices” is null !

Successfully built qiskit contextvars python-constraint yfinance dlx docplex
Installing collected packages: semantic-version, appdirs, pennylane, sympy, immutables, contextvars, retworkx, fastjsonschema, ply, python-constraint, qiskit-terra, pybind11, qiskit-aer, cryptography, ntlm-auth, requests-ntlm, websockets, qiskit-ibmq-provider, qiskit-ignis, lxml, yfinance, dlx, inflection, quandl, docplex, qiskit-aqua, qiskit, pennylane-qiskit
  Found existing installation: sympy 1.1.1
    Uninstalling sympy-1.1.1:
      Successfully uninstalled sympy-1.1.1
  Found existing installation: lxml 4.2.6
    Uninstalling lxml-4.2.6:
      Successfully uninstalled lxml-4.2.6
Successfully installed appdirs-1.4.4 contextvars-2.4 cryptography-3.2.1 dlx-1.0.4 docplex-2.15.194 fastjsonschema-2.14.5 immutables-0.14 inflection-0.5.1 lxml-4.6.1 ntlm-auth-1.5.0 pennylane-0.12.0 pennylane-qiskit-0.12.0 ply-3.11 pybind11-2.6.0 python-constraint-1.4.0 qiskit-0.23.0 qiskit-aer-0.7.0 qiskit-aqua-0.8.0 qiskit-ibmq-provider-0.11.0 qiskit-ignis-0.5.0 qiskit-terra-0.16.0 quandl-3.5.3 requests-ntlm-1.1.0 retworkx-0.5.0 semantic-version-2.6.0 sympy-1.6.2 websockets-8.1 yfinance-0.1.55
Name: PennyLane
Version: 0.12.0
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
Author: None
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python3.6/dist-packages
Requires: scipy, autograd, numpy, toml, semantic-version, networkx, appdirs
Required-by: PennyLane-qiskit
Platform info:           Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic
Python version:          3.6.9
Numpy version:           1.18.5
Scipy version:           1.4.1
Installed devices:

Hi @Yian_Chen,

Thanks for the report!

Yes, there is an issue with finding the devices when using Colab. The reason for this is that using pip inside a Colab block does not involve restarting the Python kernel. PennyLane uses entry_points internally to register devices from plugins. These entry points are loaded when starting the Python kernel and the very first time a Colab notebook is started, PennyLane is not yet installed (hence the entry_points are not loaded).

Currently known workarounds include:

  1. Restarting the runtime (Runtime menu -> Restart runtime in Colab)
  2. Importing the devices specifically from the related plugin:

Creating a device integrated with PennyLane:

from pennylane.devices.default_qubit import DefaultQubit
dev = DefaultQubit(wires=3)

Creating a device from a plugin:

from pennylane_qiskit import AerDevice

dev = AerDevice(wires=4)

Hi @antalszava

Thanks for your reply, after import devices directly, it works !

Best regards,