Package: pyenv
Version: 2.5.4-1
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,
I gave pyenv a try and noticed the following issue.

The pyenv(1) man page states, in part:

[...]
|      1. Append the following to $HOME/.bashrc
|
|                     if command -v pyenv 1>/dev/null 2>&1;
|                        eval "$(pyenv init - bash)"
|                     fi
[...]

However, this suggestion is wrong.
Firstoff, a "then" is missing after the semicolon (syntax error).
Secondly, if the PYENV_ROOT environment variable is not set to
a suitable user-writable directory, the following error is generated
each time a shell is started:

  mkdir: cannot create directory ‘/usr/share/pyenv/versions’: Permission denied

A better suggestion seems to be to append the following to $HOME/.bashrc

                      export PYENV_ROOT="$HOME/.pyenv"
                      if command -v pyenv 1>/dev/null 2>&1; then
                          eval "$(pyenv init - bash)"
                      fi

However, this (after I started actually using pyenv) began to produce
the following error each time a shell is started:

  pyenv: cannot rehash: /usr/share/pyenv/shims isn't writable

Other than this (do you need a separate bug report for it?), pyenv
seems to work, even though my $PATH is modified by adding three new
directories:

  (a)   $HOME/.pyenv/shims
  (b)   /usr/share/pyenv/shims
  (c)   /usr/share/pyenv/bin

I can understand the reason behind the addition of directory (a),
which is  $(pyenv root)/shims  , as documented in the man page.
I am not sure I understand why directory (c) is added, as this
directory does not exist.
I suspect that the addition of directory (b) is the cause of the
error I am seeing.

Please fix the man page and/or the manipulation of the $PATH by pyenv
(and/or forward my bug report upstream, as appropriate).

Thanks for your time and dedication!


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.21-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pyenv depends on:
ii  build-essential             12.12
ii  curl                        8.13.0-1
ii  expat                       2.7.1-1
ii  libauthen-sasl-perl         2.1700-1
ii  libbz2-dev                  1.0.8-6
ii  libcgi-pm-perl              4.67-1
ii  liberror-perl               0.17030-1
ii  libffi-dev                  3.4.7-1
ii  libio-socket-ssl-perl       2.089-1
ii  liblwp-protocol-https-perl  6.14-1
ii  liblzma-dev                 5.8.1-1
ii  libmediawiki-api-perl       0.52-2
ii  libncurses-dev              6.5+20250216-2
ii  libreadline-dev             8.2-6
ii  libsqlite3-dev              3.46.1-2
ii  libssl-dev                  3.5.0-1
ii  libterm-readkey-perl        2.38-2+b4
ii  libwww-perl                 6.78-1
ii  libxml2-dev                 2.12.7+dfsg+really2.9.14-0.4
ii  libxmlsec1-dev              1.2.41-1+b1
ii  llvm                        1:19.0-63
ii  make                        4.4.1-2
ii  pcre2-utils                 10.45-1
ii  python3                     3.13.2-2
ii  tk-dev                      8.6.16
ii  wget                        1.25.0-2
ii  xz-utils                    5.8.1-1
ii  zlib1g-dev                  1:1.3.dfsg+really1.3.1-1+b1

pyenv recommends no packages.

Versions of packages pyenv suggests:
ii  git               1:2.47.2-0.1
pn  libsecret-1-dev   <none>
pn  python3-openssl   <none>
ii  python3-requests  2.32.3+dfsg-4
pn  python3-tk-dbg    <none>

-- no debconf information

Reply via email to