Compiling Python 3.6.9 on Windows

我只是一个虾纸丫 提交于 2020-06-17 11:39:13

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/57060596/compiling-python-3-6-9-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!