Building on Windows

Barry Scott barry at barrys-emacs.org
Sat Jul 2 14:19:41 EDT 2022



> On 2 Jul 2022, at 15:41, Sam Ezeh <sam.z.ezeh at gmail.com> wrote:
> 
> To add to this, my process was
> 
> 1. Setup the VM
> 2. Install Git
> 3. Clone CPython
> 4. Run `PCbuild\build.bat -d -e`
> 5. Notice the error, then install visual studio community 2022

Try running this:

call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

I use that to get at the command line tools.

If that does not work then search the disk for msbuild.exe and add its folder to your PATH.

Barry

> 6. Re-run `PCbuild\build.bat -d -e` and see the same error
> 
> I can't directly copy and paste between the VM and my host desktop but
> in this scenario, the error was that single line and I can use paste
> sites where necessary.
> 
> Kind regards,
> Sam Ezeh
> 
> On Sat, 2 Jul 2022 at 15:27, Sam Ezeh <sam.z.ezeh at gmail.com> wrote:
>> 
>> I have a Windows virtual machine and I'm following the instructions on
>> the devguide [1] to build Python inside it.
>> 
>> When running `PCbuild\build\bat -e -d` I get "Cannot locate
>> MSBuild.exe on PATH or as MSBUILD variable". I've done a minimal
>> amount of searching [2][3] but I'm not well-acquainted with Windows
>> and don't understand the solutions.
>> 
>> Thanks in advance.
>> 
>> Kind regards,
>> Sam Ezeh
>> 
>> [1]: https://devguide.python.org/compiler/
>> [2]: https://bugs.python.org/issue41213
>> [3]: https://bugs.python.org/issue33675
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 



More information about the Python-list mailing list