Skip to content

qml.about() doesn't work with uv environment manager #8192

@andrijapau

Description

@andrijapau

Expected behavior

Should work regardless of what tool developers use for environment management.

Actual behavior

Breaks at runtime.

Additional information

No response

Source code

import pennylane as qml

qml.about()

Tracebacks

---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
Cell In[1], line 1
----> 1 import pennylane as qml; qml.about()

File ~/Documents/pl-ecosystem/pennylane/pennylane/about.py:40, in about()
     38     plugin_devices = metadata.entry_points(group="pennylane.plugins")
     39     dist_name = "name"
---> 40 print(check_output([sys.executable, "-m", "pip", "show", "pennylane"]).decode())
     41 print(f"Platform info:           {platform.platform(aliased=True)}")
     42 print(
     43     f"Python version:          {sys.version_info[0]}.{sys.version_info[1]}.{sys.version_info[2]}"
     44 )

File ~/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/lib/python3.12/subprocess.py:466, in check_output(timeout, *popenargs, **kwargs)
    463         empty = b''
    464     kwargs['input'] = empty
--> 466 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    467            **kwargs).stdout

File ~/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/lib/python3.12/subprocess.py:571, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
    569     retcode = process.poll()
    570     if check and retcode:
--> 571         raise CalledProcessError(retcode, process.args,
    572                                  output=stdout, stderr=stderr)
    573 return CompletedProcess(process.args, retcode, stdout, stderr)

CalledProcessError: Command '['/Users/andrija.paurevic/Documents/pl-ecosystem/pennylane/.venv/bin/python', '-m', 'pip', 'show', 'pennylane']' returned non-zero exit status 1.

System information

Name: pennylane
Version: 0.43.0.dev35
Requires: appdirs, autograd, autoray, cachetools, diastatic-malt, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, tomlkit, typing-extensions
Required-by: pennylane-lightning, pennylane-qiskit

Platform info:           macOS-15.6.1-arm64-arm-64bit
Python version:          3.12.8
Numpy version:           2.3.2
Scipy version:           1.16.1
Installed devices:
- default.clifford (pennylane-0.43.0.dev37)
- default.gaussian (pennylane-0.43.0.dev37)
- default.mixed (pennylane-0.43.0.dev37)
- default.qubit (pennylane-0.43.0.dev37)
- default.qutrit (pennylane-0.43.0.dev37)
- default.qutrit.mixed (pennylane-0.43.0.dev37)
- default.tensor (pennylane-0.43.0.dev37)
- null.qubit (pennylane-0.43.0.dev37)
- reference.qubit (pennylane-0.43.0.dev37)
- qiskit.aer (PennyLane-qiskit-0.42.0)
- qiskit.basicaer (PennyLane-qiskit-0.42.0)
- qiskit.basicsim (PennyLane-qiskit-0.42.0)
- qiskit.remote (PennyLane-qiskit-0.42.0)
- lightning.qubit (pennylane_lightning-0.43.0.dev19)

Existing GitHub issues

  • I have searched existing GitHub issues to make sure the issue does not already exist.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions