-
Notifications
You must be signed in to change notification settings - Fork 6
poetryup fails to execute on Windows within a Poetry environment #54
Comments
I think it's related to subprocess. Can you spawn a python shell and try to run the following (remember
|
@MousaZeidBaker Yep, seems like that exactly. This was performed within the > python
Python 3.10.3 (tags/v3.10.3:a342a49, Mar 16 2022, 13:07:40) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.run(["poetry", "--version"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python310\lib\subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\Python310\lib\subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python310\lib\subprocess.py", line 1435, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
>>> subprocess.run("poetry --version", shell=True)
Poetry version 1.1.13
CompletedProcess(args='poetry --version', returncode=0) |
Okay then
So how are you installing |
I install Poetry using the official installer. I agree it's odd to need |
@MousaZeidBaker Would you consider conditionally setting Something like: shell = platform.system() == "Windows" Added to: poetryup/src/poetryup/core/cmd.py Lines 27 to 31 in b7591d9
This minimizes the usage of I'd really like to use |
Brainstorming, another possible idea would be to make This would avoid shelling out to |
I tried this on Poetry 1.2.x on Windows and In any case, this doesn't seem to be an issue with |
Glad to hear this issue is finally resolved without Whenever I get some time over I'll have a look into poetry plugin as it sounds as a good option. Thanks for your contribution. |
Just wanted to let you know |
It seems that on Windows,
poetryup
cannot find the path topoetry
when installed in a Poetry session. This works fine when I tested it on macOS. Perhaps there is some kind of environment variable/subprocess
issue whenpoetryup
is running on Windows?Environment
> python --version Python 3.10.3
> poetry --version Poetry version 1.1.13
> pip list Package Version ---------- ------- click 8.1.3 colorama 0.4.5 packaging 21.3 pip 22.1 poetryup 0.8.1 pyparsing 3.0.9 setuptools 62.2.0 tomlkit 0.11.0 typer 0.4.1 wheel 0.37.1
The text was updated successfully, but these errors were encountered: