Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on windows powershell fails #704

Closed
1 task done
hcoohb opened this issue Oct 26, 2021 · 1 comment
Closed
1 task done

Installation on windows powershell fails #704

hcoohb opened this issue Oct 26, 2021 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@hcoohb
Copy link

hcoohb commented Oct 26, 2021

  • I have searched the issue tracker and believe that this is not a duplicate.

Steps to reproduce

Run (Invoke-WebRequest -Uri https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py -UseBasicParsing).Content | python - into a powershell prompt.
Windows 10
Python 3.7.5

Actual behavior

PS C:\Users\Me>  (Invoke-WebRequest -Uri https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py -UseBasicParsing).Content | python
Installing PDM (1.10.0): Creating virtual environment
Installing PDM (1.10.0): Installing PDM and dependencies
Traceback (most recent call last):
  File "<stdin>", line 433, in <module>
  File "<stdin>", line 429, in main
  File "<stdin>", line 355, in install
  File "<stdin>", line 304, in _install
  File "<stdin>", line 45, in _call_subprocess
  File "C:\Users\Me\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 488, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\Me\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1148, in _execute_child
    args = list2cmdline(args)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 555, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable

Expected behavior

Installation of pdm

Other details,

Adding some output to the _call_subprocess function, it seems it was called with the args being:
[WindowsPath('C:/Users/Me/AppData/Roaming/pdm/venv/Scripts/python.exe'), '-m', 'pip', 'install', 'pdm==1.10.0']
So maybe the call to _call_subprocess needs to be made with str(venv_python) (L 303)? and similarly on Line 342?

@hcoohb hcoohb added the 🐛 bug Something isn't working label Oct 26, 2021
@frostming
Copy link
Collaborator

You are right, Python 3.7 doesn't support that usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants