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.

5
  • The tarball includes build instructions for Windows systems. Commented Jul 16, 2019 at 15:24
  • Why don't you just install the official installer from python.org/downloads? Installing Python from source is a task that shouldn't be taken if someone ends on SO with an issue. Commented Jul 16, 2019 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. Commented Jul 16, 2019 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. Commented Jul 16, 2019 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. :) Commented Jul 16, 2019 at 17:42

1 Answer 1

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.

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

5 Comments

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
"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. de.mathworks.com/help/releases/R2018b/matlab/…
@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.
@bers: projects can compile against the stable ABI to ensure forward compatibility for binary extensions.
Python 3.7 isn't fully backwards-compatible though. From 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.

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.