0

I am connected to a machine running Windows 8 from my linux machine using OpenSSH. I need to download python3 on the Windows machine but I only have access to the command prompt, not PowerShell. I also have sftp set up, but all the python downloads are installers which don't work through the command prompt. Does anybody know what I can do?

6
  • The python installer can be used from the command line docs.python.org/3/using/windows.html#installing-without-ui Commented Jun 2, 2020 at 17:31
  • It's not clear whether you're asking how to download a Python installer or run it afterwards (from the command line). Please edit your question and clarify. Commented Jun 2, 2020 at 17:49
  • @tdelaney yea I tried that and ran the command python-3.8.3-amd64.e xe /passive InstallAllUsers=0 PrependPath=1 Include_test=0 and there was no output and python was still not a recognized command Commented Jun 2, 2020 at 18:06
  • Its directory may not have been added to your path. Did you try an absolute path to python.exe? Commented Jun 2, 2020 at 18:09
  • That was it. Thanks Commented Jun 2, 2020 at 18:41

1 Answer 1

2

You can download using the curl program, if it's installed on your windows machine. Something like:

curl https://www.python.org/ftp/python/3.8.3/python-3.8.3-amd64.exe -o python_install.exe

(or look for the Python version you want at https://www.python.org/downloads/windows/)

Then, you can run:

python_install.exe /quiet

There are also zip file packages you can download from the URL above.

Note that a quiet install may not change your system's PATH, so you may need to locate the directory in which Python was installed, and call the program from there.

Sign up to request clarification or add additional context in comments.

2 Comments

I tried that but there was no output and typing python into the command prompt still resulted in it not being recognized
This is probably because the PATH environment variable was not updated, and you need to find where Python was installed. I would guess "c:\Program Files\Python38\python.exe".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.