Skip to content

PET fails with pyenv shims #238

@dabljues

Description

@dabljues

Hey.

When running pet find, I get many errors regarding pyenv shims:

~/.cargo/bin/pet find
[2025-08-14T09:53:18Z ERROR pet_python_utils::env] Python Execution for "/home/dabljues/.pl/pyenv/shims/python3.10" produced an output "" without a separator
[2025-08-14T09:53:18Z WARN  pet::find] Unknown Python Env "/home/dabljues/.pl/pyenv/shims/python3.10"
[2025-08-14T09:53:18Z ERROR pet_python_utils::env] Python Execution for "/home/dabljues/.pl/pyenv/shims/python3.11" produced an output "" without a separator
[2025-08-14T09:53:18Z WARN  pet::find] Unknown Python Env "/home/dabljues/.pl/pyenv/shims/python3.11"
[2025-08-14T09:53:19Z ERROR pet_python_utils::env] Python Execution for "/home/dabljues/.pl/pyenv/shims/python3.6" produced an output "" without a separator
[2025-08-14T09:53:19Z WARN  pet::find] Unknown Python Env "/home/dabljues/.pl/pyenv/shims/python3.6"
[2025-08-14T09:53:19Z ERROR pet_python_utils::env] Python Execution for "/home/dabljues/.pl/pyenv/shims/python3.7" produced an output "" without a separator
[2025-08-14T09:53:19Z WARN  pet::find] Unknown Python Env "/home/dabljues/.pl/pyenv/shims/python3.7"
[2025-08-14T09:53:20Z ERROR pet_python_utils::env] Python Execution for "/home/dabljues/.pl/pyenv/shims/python3.8" produced an output "" without a separator
[2025-08-14T09:53:20Z WARN  pet::find] Unknown Python Env "/home/dabljues/.pl/pyenv/shims/python3.8"
[2025-08-14T09:53:20Z ERROR pet_python_utils::env] Python Execution for "/home/dabljues/.pl/pyenv/shims/python3.9" produced an output "" without a separator
[2025-08-14T09:53:20Z WARN  pet::find] Unknown Python Env "/home/dabljues/.pl/pyenv/shims/python3.9"

Breakdown by each locator:
--------------------------
Conda                : 35.236589ms
Homebrew             : 50.976µs
LinuxGlobal          : 60.041888ms
PipEnv               : 461ns
Pixi                 : 541ns
Poetry               : 633.374µs
PyEnv                : 7.12696ms
Venv                 : 330ns
VirtualEnv           : 421ns
VirtualEnvWrapper    : 281ns

Breakdown for finding Environments:
-----------------------------------
GlobalVirtualEnvs    : 25.628µs
Locators             : 62.514711ms
Path                 : 3.54118956s
Workspaces           : 16.999097ms

Managers:
---------
Poetry               : 1
Pyenv                : 1

Environments (21):
------------------
GlobalPaths          : 6
LinuxGlobal          : 2
Pyenv                : 12
Venv                 : 1

Completed in 3542ms

If I remove the shims from the path, the search is orders of magnitude quicker + the pyenv environments number found doesn't change (meaning I guess PET found pyenv envs):

Breakdown by each locator:
--------------------------
Conda                : 32.477717ms
Homebrew             : 122.902µs
LinuxGlobal          : 59.467724ms
PipEnv               : 781ns
Pixi                 : 621ns
Poetry               : 666.517µs
PyEnv                : 5.474664ms
Venv                 : 300ns
VirtualEnv           : 360ns
VirtualEnvWrapper    : 230ns

Breakdown for finding Environments:
-----------------------------------
GlobalVirtualEnvs    : 7.011232ms
Locators             : 61.457978ms
Path                 : 172.014256ms
Workspaces           : 16.419474ms

Managers:
---------
Poetry               : 1
Pyenv                : 1

Environments (21):
------------------
GlobalPaths          : 6
LinuxGlobal          : 2
Pyenv                : 12
Venv                 : 1

Completed in 173ms

The problem is, pyenv docs explicitly say that the shims should be in PATH: https://github.com/pyenv/pyenv?tab=readme-ov-file#nushell. I guess my question is: should this be happening? Because a slowdown like this is noticeable (when for example PET is used by an editor). Maybe I have misconfigured something?

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions