This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Unable to compile the cpython code x86 windows
Type: compile error Stage: resolved
Components: Build, Windows Versions: Python 3.8
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Dennis Sweeney, paul.moore, steve.dower, sunny, terry.reedy, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2021-01-01 18:00 by sunny, last changed 2022-04-11 14:59 by admin. This issue is now closed.

File name Uploaded Description Edit
error_python_compilation.JPG sunny, 2021-01-01 18:00
errors_python.JPG sunny, 2021-01-01 19:14
Messages (10)
msg384194 - (view) Author: Sunny (sunny) Date: 2021-01-01 18:00
Hi Team,

While I am trying to build the  cpython in windows 10. I am getting tcl.h file not found error.

You can find the screen shot of the error along with the bug.

msg384195 - (view) Author: Dennis Sweeney (Dennis Sweeney) * (Python committer) Date: 2021-01-01 18:21
What commands did you enter? Are you following the instructions at ?
msg384196 - (view) Author: Sunny (sunny) Date: 2021-01-01 18:31
Followed the instructions as per the link

While running the command build.bat
msg384199 - (view) Author: Dennis Sweeney (Dennis Sweeney) * (Python committer) Date: 2021-01-01 18:48
Were you able to run PCbuild\get_externals.bat ?
msg384200 - (view) Author: Sunny (sunny) Date: 2021-01-01 19:14
I just ran the file but got the below error 
 saying permission denied 

PermissionError: [WinError 5] Access is denied: 'E:\\Libarary\\workspace\\python_dev\\cpython\\PCbuild\\..\\externals\\cpython-bin-deps-tcltk-' -> 'E:\\Libarary\\workspace\\python_dev\\cpython\\PCbuild\\..\\externals\\tcltk-'
msg384201 - (view) Author: Sunny (sunny) Date: 2021-01-01 19:21
I am running using admin rights but still getting the error
msg384365 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-05 02:52
From the evidence presented, the problem building 3.8 on Win 10 is not with our build code.  I therefore believe that this should be closed as '3rd-party' and that Sunny should inquire on python-list about the permission problem.  However, I marked this for 'Window' and will give our Windows experts a few days to add something before closing.
msg384406 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2021-01-05 15:28
It seems possible that the fetch of the Tcl/Tk binaries failed somehow; you can try removing the entire `externals` directory (or just anything in it that includes `tcl` or `tk`); you can use `PCbuild\get_externals.bat --clean` to do so.
msg384407 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-01-05 15:29
If we can solve it, that would be better.

The access denied error looks a bit like a build process (or previous Python build?) is still running that has locked one of the files. Restarting the PC is the easiest way to make sure nothing is using them, or you could try renaming the directory in your Externals folder and running get_externals again.
msg386549 - (view) Author: Sunny (sunny) Date: 2021-02-06 07:43
Got it fixed with following the below steps 
a. Delete external folder 
b. Run the below build command 

build.bat -k -E -p x64

-k killed the existing python build process
-E skipped the external libraries fetching 
-p mentioned the platform

closing the ticket as it worked
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 86970
2021-02-06 07:43:35sunnysetstatus: open -> closed

messages: + msg386549
stage: resolved
2021-01-05 15:29:23steve.dowersetmessages: + msg384407
2021-01-05 15:28:34zach.waresetmessages: + msg384406
2021-01-05 02:52:40terry.reedysetnosy: + terry.reedy, paul.moore, tim.golden, zach.ware, steve.dower
messages: + msg384365
components: + Windows
2021-01-01 19:21:24sunnysetmessages: + msg384201
2021-01-01 19:14:13sunnysetfiles: + errors_python.JPG

messages: + msg384200
2021-01-01 18:48:59Dennis Sweeneysetmessages: + msg384199
2021-01-01 18:31:18sunnysetmessages: + msg384196
2021-01-01 18:21:41Dennis Sweeneysetnosy: + Dennis Sweeney
messages: + msg384195
2021-01-01 18:02:08sunnysettype: compile error
title: Unable to compile the code x86 windows -> Unable to compile the cpython code x86 windows
2021-01-01 18:00:07sunnycreate