-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Doc]: Instructions for editable installation on Windows potentially missing a step #27168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I didn't have to run this command to install on my windows machine, but I did have to force msvc. What about adding it as a troubleshooting entry: https://matplotlib.org/devdocs/devel/troubleshooting.html |
Are you installing in a conda environment or a venv? |
I'm installing in a venv. I think I figured out the specific problem I have. I had a stray installation of GCC and related tools on my system, courtesy of Strawberry Perl. Their installer adds that folder to the system PATH variable without asking or explicitly telling. Forcing msvc, as suggested, fixes the problem as well. Maybe it would be a good idea, to always force msvc on windows? |
Ah yes, Strawberry Perl is something. I did not initially force MSVC, because theoretically one may want to use other compilers (e.g., Cygwin), and we don't actually require anything specially from MSVC. Though as this seems to keep tripping up people, it may be better to make this the default and have the other less-common option go through the hoop of turning it off instead. |
Could also add a sentence linking the troubleshooting entry in the install docs. At the end of the section, a sentence like folks building on windows may need to :ref:`force msvc <link to troubleshooting entry>. |
In my opinion, that would be a good solution as well. I somehow found the troubleshooting section easy to miss. |
I went slightly more general, but does the solution in #27226 work for you? If not, what should I add? |
I think that's a good solution 👍 I'll close this because the problem I had is resolved and docs have been improved. |
Documentation Link
https://matplotlib.org/devdocs/devel/dependencies.html#compiled-extensions
Problem
The documentation states to install the Visual Studio Build Tools and through these the latest MSVC, "C++ CMake tools for Windows," and a Windows SDK.
Even though I did that (and rebooted), the editable install did not work. The installation process and compilation itself seemed to be working fine. At least, I couldn't spot any obvious errors in the output. But Matplotlib failed to import due to some DLLs not being found.
What fixed it for me, was running the following command:
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
Obviously, path and architecture may be different for other users. But it seems this step is necessary to correctly set up the environment. I'm not very familiar with this MSVC stuff though, so maybe this was some peculiarity on my system? Someone who knows more about this should decide whether this is right or not.
Suggested improvement
Add a note to run this command before the editable install.
The text was updated successfully, but these errors were encountered: