1

I am trying to install Python 3.6.9 and am having problems. First I downloaded Python-3.6.9-tgz, then extracted it to get Python-3.6.9.tar, then extracted that to get a folder called Python-3.6.9

This has setup.py in it. So on windows 10 I opened the command prompt and navigated to that folder and typed: setup.py install. This opens up visual studio that I already have and does nothing. Please let me know if I need to do something else.

I tried to add environmental variables but nothing has worked.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Eric33
  • 13
  • 1
  • 2
  • 6
  • The tarball includes [build instructions for Windows systems](https://github.com/python/cpython/blob/3.6/PCbuild/readme.txt). – Martijn Pieters Jul 16 '19 at 15:24
  • Why don't you just install the official installer from https://www.python.org/downloads/? Installing Python from source is a task that shouldn't be taken if someone ends on SO with an issue. – ipaleka Jul 16 '19 at 15:25
  • That said, why are you trying to build 3.6.9? You would be *much better of* installing an already built Python 3.7 distribution for Windows. 3.6.9 is only available in source form because it is a security-only release aimed at long-term support Linux distributions, so no pre-build binaries are made available. – Martijn Pieters Jul 16 '19 at 15:26
  • @ipaleka: for Python 3.6.9, there are no installers, because it is a security-fixes only release (the last phase of the 3.6.x release cycle). Building installers is a time-intensive task for release managers, and with 3.7.x releases available that time is no longer worth it. – Martijn Pieters Jul 16 '19 at 15:43
  • Yep, my point was kind of rule of thumb that installing Python from source issue that reached SO is solvable by prevention. :) – ipaleka Jul 16 '19 at 17:42

1 Answers1

2

First of all: You should really just download Python 3.7.4. Python 3.7 is backwards compatible with Python 3.6.

The Python 3.6.9 release is a security-only release primarily aimed at Long-term-support Linux distributions that must continue to support 3.6.x packages. As such no binary installers are provided, and Windows users are instead expected to have upgraded to 3.7 already.

If you still feel you want to compile Python 3.6.9, then the README.rst file includes installation instructions for Unix, Linux, BSD, macOS, and Cygwin, and for Windows points you to a dedicated file:

On Windows, see PCbuild/readme.txt.

which can be found online at https://github.com/python/cpython/blob/v3.6.9/PCbuild/readme.txt. The same directory holds a batch script designed to make building Python easier on Windows. From the above documentation:

Building Python using the build.bat script

In this directory you can find build.bat, a script designed to make building Python on Windows simpler. This script will use the env.bat script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of which may be used to build Python, though only Visual Studio 2015 is officially supported.

By default, build.bat will build Python in Release configuration for the 32-bit Win32 platform. It accepts several arguments to change this behavior, try build.bat -h to learn more.

The setup.py script is used indirectly by the build process. Don't run it yourself.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • Ok great thank you, I will go ahead and install the 3.7 version later and let you know how it goes. Thanks for the response – Eric33 Jul 16 '19 at 16:10
  • "Python 3.7 is backwards compatible with Python 3.6." - Well, tell that the package maintaners of (e.g.) `matlabengineforpython===R2018b`: this is only available for Python 3.6. https://de.mathworks.com/help/releases/R2018b/matlab/matlab-engine-for-python.html – bers Oct 08 '19 at 08:43
  • @bers: that link requires a login, so I can’t see it. If a project is distributed in binary form only then yes, the project needs to release a version compiled with 3.7. I’m talking about Python source code only. – Martijn Pieters Oct 08 '19 at 08:53
  • @bers: projects can [compile against the stable ABI](https://docs.python.org/3/c-api/stable.html) to ensure forward compatibility for binary extensions. – Martijn Pieters Oct 08 '19 at 08:56
  • 1
    Python 3.7 isn't fully backwards-compatible though. From https://docs.python.org/3/whatsnew/3.7.html `async` and `await` are now reserved keywords. Also see under "API and Feature Removals". Not to mention that many libraries put an upper bound on supported Python versions and can take a while to update this, so it's not always so easy to upgrade major Python versions. – Tobotimus Jan 02 '20 at 00:30