To install security patches after the last full bugfix release, you must build Python from source:
Compile the Binaries
- Install
Visual Studio 2019 Communityand select:
the Python development workload, and
the Python native development tools (this is under
Optional, but is necessary in order to build python from source)
Download the python source code and unzip it.
Navigate to the folder and install required external dependencies by running
PCbuild\get_externals.batBuild the debug (
python_d.exe) and release (python.exe) binaries
> PCbuild\build.bat -p x64 -c Debug
> PCbuild\build.bat -p x64 -c Release
you can also build the Profile Guided Optimization (pgo) binary
> PCbuild\build.bat -p x64 --pgo
The binaries on python.org are run through PGO by default, so a --pgo binary will be faster than a -c Release binary. The debug binary is necessary for adding breakpoints and debugging your code.
All built binaries are placed in PCbuild\amd64.
Build the Installer
The instructions for building an installer are in Tools\msi\README.txt.
- Download the extra build dependencies by running
Tools\msi\get_externals.bat
NOTE: This is done in addition to running
PCbuild/get_externals.bat.It installs additional binaries to
externals\windows-installerthat are needed for making installers. Specifically,
- WiX (
wix.exe), which is a toolset that lets developers create installers for Windows Installer, the Windows installation engine.- HTML Help (
htmlhelp), which is for building documentation.
Turn on
.NET Framework 3.5 FeaturesunderTurn Windows features on or off
NOTE: This is required by WiX.
- Build the installer by running
> .\Tools\msi\buildrelease.bat -x64
NOTE: Be sure the following environment variables are properly set or left blank so the script can set them:
PYTHON=<path to python.exe>
SPHINXBUILD=<path to sphinx-build.exe>
The installer will be placed in PCbuild\amd64\en-us. It is a single .exe (the installer entry point). The folder will also have a number of additional CAB and MSI files. Each MSI contains the logic required to install a component or feature of Python, but these should not be run directly.
Specify --pack to build an installer that does not require all MSIs to be available alongside. This takes longer, but is easier to share.
To install security patches after the last full bugfix release, you must build Python from source:
Compile the Binaries
- Install
Visual Studio 2019 Communityand select:
the Python development workload, and
the Python native development tools (this is under
Optional, but is necessary in order to build python from source)
Download the python source code and unzip it.
Navigate to the folder and install required external dependencies by running
PCbuild\get_externals.batBuild the debug (
python_d.exe) and release (python.exe) binaries
> PCbuild\build.bat -p x64 -c Debug
> PCbuild\build.bat -p x64 -c Release
you can also build the Profile Guided Optimization (pgo) binary
> PCbuild\build.bat -p x64 --pgo
The binaries on python.org are run through PGO by default, so a --pgo binary will be faster than a -c Release binary. The debug binary is necessary for adding breakpoints and debugging your code.
All built binaries are placed in PCbuild\amd64.
Build the Installer
The instructions for building an installer are in Tools\msi\README.txt.
- Download the extra build dependencies by running
Tools\msi\get_externals.bat
NOTE: This is done in addition to running
PCbuild/get_externals.bat.It installs additional binaries to
externals\windows-installerthat are needed for making installers. Specifically,
- WiX (
wix.exe), which is a toolset that lets developers create installers for Windows Installer, the Windows installation engine.- HTML Help (
htmlhelp), which is for building documentation.
Turn on
.NET Framework 3.5 FeaturesunderTurn Windows features on or off
NOTE: This is required by WiX.
- Build the installer by running
> .\Tools\msi\buildrelease.bat -x64
NOTE: Be sure the following environment variables are properly set or left blank so the script can set them:
PYTHON=<path to python.exe>
SPHINXBUILD=<path to sphinx-build.exe>
The installer will be placed in PCbuild\amd64\en-us. It is a single .exe (the installer entry point). The folder will also have a number of additional CAB and MSI files. Each MSI contains the logic required to install a component or feature of Python, but these should not be run directly.
Specify --pack to build an installer that does not require all MSIs to be available alongside. This takes longer, but is easier to share.
I managed to install python of version 3.6.13 using conda
Just install python 3.6 in separate invironment:
conda create -n myenvironment python=3.6
conda activate myenvironment
python --vesion
Or point out specific version:
conda create -n myenvironment python=3.6.13
Check all available versions:
conda search python
Corporate IT have banned all versions of python lower than the latest
Python 3.7.9 and 3.6.12 security updates now available
Security updates, need to recompile?
The final Python 3.9 security fix release is out! - Core Development - Discussions on Python.org
I.e. right now they are insisting we use v3.12 only because older versions have some vulnerabilities their scanner picked up.
I need to somehow explain that this is a terrible idea and that many packages won't support the most up to date version without causing them to panic and overstep even more.
This requirement is company wide (affects development, data science and analytics).
Edit - thanks for all the advice, I think the crux is that they don't understand how the versioning works and are confusing major and minor versions. I will explain this and hopefully we will be able to use the latest minor versions for 3.11/3.10/3.9
» pip install safety