Skip to content

Commit 1855184

Browse files
authored
DOC: Added additional guidance for compiling in Windows (numpy#27746)
1 parent ac7ef85 commit 1855184

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

doc/source/building/index.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ your system.
161161
This is needed even if you use the MinGW-w64 or Intel compilers, in order
162162
to ensure you have the Windows Universal C Runtime (the other components of
163163
Visual Studio are not needed when using Mingw-w64, and can be deselected if
164-
desired, to save disk space).
164+
desired, to save disk space). The recommended version of the UCRT is
165+
>= 10.0.22621.0.
165166

166167
.. tab-set::
167168

@@ -174,6 +175,12 @@ your system.
174175
run a ``.bat`` file for the correct bitness and architecture (e.g., for
175176
64-bit Intel CPUs, use ``vcvars64.bat``).
176177

178+
If using a Conda environment while a version of Visual Studio 2019+ is
179+
installed that includes the MSVC v142 package (VS 2019 C++ x86/x64
180+
build tools), activating the conda environment should cause Visual
181+
Studio to be found and the appropriate .bat file executed to set
182+
these variables.
183+
177184
For detailed guidance, see `Use the Microsoft C++ toolset from the command line
178185
<https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170>`__.
179186

@@ -256,6 +263,12 @@ Building from source to use NumPy
256263
git submodule update --init
257264
pip install . --no-build-isolation
258265

266+
.. warning::
267+
268+
On Windows, the AR, LD, and LDFLAGS environment variables may be set,
269+
which will cause the pip install command to fail. These variables are only
270+
needed for flang and can be safely unset prior to running pip install.
271+
259272
.. tab-item:: Virtual env or system Python
260273
:sync: pip
261274

@@ -363,6 +376,13 @@ like build the html documentation or running benchmarks. The ``spin``
363376
interface is self-documenting, so please see ``spin --help`` and
364377
``spin <subcommand> --help`` for detailed guidance.
365378

379+
.. warning::
380+
381+
In an activated conda enviroment on Windows, the AR, LD, and LDFLAGS
382+
environment variables may be set, which will cause the build to fail.
383+
These variables are only needed for flang and can be safely unset
384+
for build.
385+
366386
.. _meson-editable-installs:
367387

368388
.. admonition:: IDE support & editable installs

0 commit comments

Comments
 (0)