1

I have just acquired a stand alone PC running XP, and I do not want to connect to the internet. I am running python 2.7 on my laptop and was wondering if there was a way to install the python.exe file to a flash drive so I can install python 2.7 on the stand alone. The download from the python.org website goes straight to the path in my c drive, and will not let me save it to the flash drive. I have tried installing from active state, and I am unable to use this as it is not win32. Any help will be much appreciated.

VC.One
  • 14,790
  • 4
  • 25
  • 57
Peter Gallant
  • 15
  • 1
  • 4

2 Answers2

0

You can download python's zip file then unzip it onto your flash drive, here's the link for the latest release of python 3.6.1 with win32 including all the components that python is required to run as well as the python.exe that you wanted:

https://www.python.org/ftp/python/3.6.1/python-3.6.1-embed-win32.zip

Here's the link to the downloads page, if you wanted another version of python, look for Download Windows x86 embeddable zip file.

Taku
  • 31,927
  • 11
  • 74
  • 85
  • I'm going to try it now, fingers crossed – Peter Gallant Apr 08 '17 at 16:45
  • So that did not work, the XP pc is still saying python-3.6.1-embed-win32\python.ex is not a valid Win32 application. Any ideas?? – Peter Gallant Apr 08 '17 at 16:53
  • That's exactly what it said? Try running python in the cmd by cd to that file folder and then type `python` – Taku Apr 08 '17 at 16:58
  • Yeah that is exactly what it said. Using the cmd it said python is not recognized as an internal or external command, operable program or batch file – Peter Gallant Apr 08 '17 at 17:12
  • This is weird, it should be valid exe and a valid command as well, sorry I have no way of testing this because don't have a win xp so couldn't reproduce. Did you unzip and everything inside including the other zip file? Did correctly cd to it in the cmd? It should work... sorry if I couldn't help – Taku Apr 08 '17 at 17:22
  • dont worry about it, it is an odd thing I am after – Peter Gallant Apr 08 '17 at 17:24
  • Without going to a lot of (insane) trouble, it is likely that Python 3.6 simply cannot run on Windows XP. See [this question](https://stackoverflow.com/questions/47516712/what-versions-of-python-will-work-in-windows-xp). The downloads page you linked to says as much, and there are no embeddable versions prior to 3.5, which is also not runnable on XP. – John Y Jul 26 '21 at 22:48
0

If you want a clean, standard CPython installation without bells and whistles on your offline Windows XP machine, you can use your flash drive to transport a Python 2.7 installer from python.org to your Windows XP machine's local hard drive, and then run the installer from there. It could be somewhere between inconvenient and difficult to install third-party packages (as you would find on PyPI) without the full benefit of pip. (Depending on the specific packages you want, you may be able to transport installers or wheels and still use pip in offline mode, without automatic dependency installation.)

If you want a full-featured but potentially big "portable" installation that you can just plop into any directory and use from there, you can try an old version of Portable Python (the project is defunct but the download page is still up as of this writing) or WinPython (note that this answer suggests sticking with 2.7.9 or earlier).

John Y
  • 14,123
  • 2
  • 48
  • 72