python-poetry / python-poetry/install.python-poetry.org

Official Install on Windows PowerShell failed on FileNotFoundError

未关闭
#69 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
255
派生
65
平均合并
2 小时 48 分钟
30 天内合并 PR
1

描述

I've been trying to update my 1.1.13 poetry install to 1.2.2 using the official doc but it failed.

PS D:\Downloads>(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python3 -
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

D:\AppData\Roaming\Python\Scripts

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.2.2)
Installing Poetry (1.2.2): Saving existing environment
Installing Poetry (1.2.2): Creating environment
Installing Poetry (1.2.2): An error occurred. Removing partial environment.
Installing Poetry (1.2.2): Restoring previously saved environment.
Traceback (most recent call last):
  File "D:\Downloads\install-poetry.py", line 940, in <module>
    sys.exit(main())
  File "D:\Downloads\install-poetry.py", line 919, in main
    return installer.run()
  File "D:\Downloads\install-poetry.py", line 550, in run
    self.install(version)
  File "D:\Downloads\install-poetry.py", line 571, in install
    with self.make_env(version) as env:
  File "D:\.pyenv\pyenv-win\versions\3.9.6\lib\contextlib.py", line 117, in __enter__
    return next(self.gen)
  File "D:\Downloads\install-poetry.py", line 643, in make_env
    raise e
  File "D:\Downloads\install-poetry.py", line 629, in make_env
    yield VirtualEnvironment.make(env_path)
  File "D:\Downloads\install-poetry.py", line 319, in make
    builder.create(target)
  File "D:\.pyenv\pyenv-win\versions\3.9.6\lib\venv\__init__.py", line 75, in create
    self._setup_pip(context)
  File "D:\.pyenv\pyenv-win\versions\3.9.6\lib\venv\__init__.py", line 298, in _setup_pip
    subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File "D:\.pyenv\pyenv-win\versions\3.9.6\lib\subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "D:\.pyenv\pyenv-win\versions\3.9.6\lib\subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "D:\.pyenv\pyenv-win\versions\3.9.6\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "D:\.pyenv\pyenv-win\versions\3.9.6\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable

and the error same occurs after poetry uninstall with both python 3.9.6 and python3.8.10

I now don't have poetry anymore on my computer 😢

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 install-poetry.py 开始,重点查看 Installer.run、Installer.install、make_env 和 VirtualEnvironment.make,然后在 Windows 上使用 Python 3.9.6 和 3.8.10 重现官方 PowerShell 命令。检查虚拟环境创建路径和 subprocess 失败;当文档中的安装过程在没有 FileNotFoundError 的情况下完成,并且 Poetry 在卸载后恢复时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
powershell, python
领域
tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。