You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker and believe that this is not a duplicate.
Steps to reproduce
Install latest pyenv (v2.3.5)
Install pdm 2.1.5
Do pdm init in any folder
Can be reproduced building the following Docker image:
FROM python:3.9.7-slim AS base
RUN apt-get update && apt-get install -y git curl
ENV PYENV_GIT_TAG v2.3.5
RUN curl https://pyenv.run | bash
RUN pip install pdm==2.1.5
RUN pdm init -v -n
Actual behavior
An exception is raised
Creating a pyproject.toml for PDM...
Traceback (most recent call last):
File "/usr/local/bin/pdm", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/pdm/core.py", line 254, in main
return Core().main(args)
File "/usr/local/lib/python3.9/site-packages/pdm/core.py", line 187, in main
raise cast(Exception, err).with_traceback(traceback)
File "/usr/local/lib/python3.9/site-packages/pdm/core.py", line 182, in main
f(options.project, options)
File "/usr/local/lib/python3.9/site-packages/pdm/cli/commands/init.py", line 51, in handle
python = actions.do_use(project, ignore_requires_python=True, hooks=hooks)
File "/usr/local/lib/python3.9/site-packages/pdm/cli/actions.py", line 652, in do_use
found_interpreters = list(dict.fromkeys(project.find_interpreters(python)))
File "/usr/local/lib/python3.9/site-packages/pdm/project/core.py", line 693, in find_interpreters
for entry in finder.find_all(*args):
File "/usr/local/lib/python3.9/site-packages/findpython/finder.py", line 103, in find_all
matched_python = set(self._find_all_python_versions())
File "/usr/local/lib/python3.9/site-packages/findpython/finder.py", line 136, in _find_all_python_versions
yield from provider.find_pythons()
File "/usr/local/lib/python3.9/site-packages/findpython/providers/pyenv.py", line 27, in find_pythons
for version in self.root.joinpath("versions").iterdir():
File "/usr/local/lib/python3.9/pathlib.py", line 1160, in iterdir
for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: '/root/.pyenv/versions'
Expected behavior
pdm init executes normally, ignoring the clean pyenv installation
The text was updated successfully, but these errors were encountered:
Steps to reproduce
pdm init
in any folderCan be reproduced building the following Docker image:
Actual behavior
An exception is raised
Expected behavior
pdm init executes normally, ignoring the clean pyenv installation
The text was updated successfully, but these errors were encountered: