install.python-poetry.org icon indicating copy to clipboard operation
install.python-poetry.org copied to clipboard

Official Install on Windows PowerShell failed on FileNotFoundError

Open Sigmun opened this issue 3 years ago • 3 comments

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 😢

Sigmun avatar Oct 12 '22 06:10 Sigmun

Looks like a duplicate of the symptoms of #46 somehow, but in powershell, which is novel.

neersighted avatar Oct 12 '22 12:10 neersighted

I have the same issue, after updated to the latest win 10, poetry does not work, I tried uninstall poetry and cannot re-install the latest, encounter this error. Maybe I would switch back to venv while wait for this issue resolve.

baotang2118 avatar Jan 17 '23 17:01 baotang2118

C:\WINDOWS\system32> (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - 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:

C:\Users\thizi\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.8.2) Installing Poetry (1.8.2): Creating environment Installing Poetry (1.8.2): An error occurred. Removing partial environment. Traceback (most recent call last): File "", line 560, in run File "", line 581, in install File "C:\Users\thizi\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 137, in enter return next(self.gen) ^^^^^^^^^^^^^^ File "", line 653, in make_env File "", line 639, in make_env File "", line 327, in make File "C:\Users\thizi\AppData\Local\Programs\Python\Python311\Lib\venv_init_.py", line 76, in create self.setup_pip(context) File "C:\Users\thizi\AppData\Local\Programs\Python\Python311\Lib\venv_init.py", line 358, in _setup_pip self.call_new_python(context, '-m', 'ensurepip', '--upgrade', File "C:\Users\thizi\AppData\Local\Programs\Python\Python311\Lib\venv_init.py", line 354, in _call_new_python subprocess.check_output(args, **kwargs) File "C:\Users\thizi\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 466, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thizi\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['C:\Users\thizi\AppData\Roaming\pypoetry\venv\Scripts\python.exe', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 945, in File "", line 923, in main File "", line 563, in run UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 1566: invalid continuation byte

ThiziFler47 avatar Mar 21 '24 17:03 ThiziFler47