Skip to content
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

[Bug]: ImportError: DLL load failed while importing _path in conda development installation #27266

Closed
schtandard opened this issue Nov 4, 2023 · 15 comments

Comments

@schtandard
Copy link

Bug summary

I want to set up a development installation of matplotlib following the instructions here. I am on Windows 11 using conda and gcc from MSYS2. I did a fresh git clone, created the conda environment and successfully installed matplotlib using pip, as instructed. However, when I try to import it, I get the following error:

(mpl-dev) d:\Projekte\miscellaneous_git_repos\matplotlib>python
Python 3.11.6 | packaged by conda-forge | (main, Oct  3 2023, 10:29:11) [MSC v.1935 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Projekte\miscellaneous_git_repos\matplotlib\lib\matplotlib\__init__.py", line 161, in <module>
    from . import _api, _version, cbook, _docstring, rcsetup
  File "D:\Projekte\miscellaneous_git_repos\matplotlib\lib\matplotlib\rcsetup.py", line 27, in <module>
    from matplotlib.colors import Colormap, is_color_like
  File "D:\Projekte\miscellaneous_git_repos\matplotlib\lib\matplotlib\colors.py", line 57, in <module>
    from matplotlib import _api, _cm, cbook, scale
  File "D:\Projekte\miscellaneous_git_repos\matplotlib\lib\matplotlib\scale.py", line 22, in <module>
    from matplotlib.ticker import (
  File "D:\Projekte\miscellaneous_git_repos\matplotlib\lib\matplotlib\ticker.py", line 143, in <module>
    from matplotlib import transforms as mtransforms
  File "D:\Projekte\miscellaneous_git_repos\matplotlib\lib\matplotlib\transforms.py", line 49, in <module>
    from matplotlib._path import (
ImportError: DLL load failed while importing _path: The specified procedure could not be found.

I found a couple of issues with similar problems on here, but those seemed to be resolved by using a newer version of Python or of Matplotlib, both of which I am already doing (relative to those issues).

I also found allusions that I might need some MSVC installation for the dll, though it is unclear to me how to check that. I have the Visual C++ Redistributables 2010, 2012, 2013, 2015-2019, and 2017 installed from other applications, though, so I assume that I am fine on that front.

Code for reproduction

import matplotlib

Actual outcome

Error (see above).

Expected outcome

No error.

(Sorry about the redundancy, I could not quite make this issue fit the template..)

Additional information

No response

Operating system

Windows 11

Matplotlib Version

3.9.0

Matplotlib Backend

No response

Python version

3.11.6

Jupyter version

No response

Installation

None

@jklymak
Copy link
Member

jklymak commented Nov 4, 2023

What pip command did you use? Note that it recently changed. https://matplotlib.org/devdocs/devel/contribute.html#workflow-overview

@schtandard
Copy link
Author

I used

python -m pip install --verbose --no-build-isolation --editable .[dev]

so the same as you linked, except for the --verbose flag.

@QuLogic
Copy link
Member

QuLogic commented Nov 7, 2023

Can you run Dependency Walker on the DLL to find out which runtime DLL is missing? Though it seems to be complaining about a missing symbol instead.

@schtandard
Copy link
Author

@QuLogic I'm happy to do that but I'm unsure which file to run it on and what to look for. Do I use the GUI or the command line (how?) and post the output here? Where do I find the relevant DLL to run on?

@QuLogic
Copy link
Member

QuLogic commented Nov 8, 2023

Using the editable install, it should be in D:\Projekte\miscellaneous_git_repos\matplotlib\build\cp311\src\_path.cp311-win_amd64.pyd. I think the GUI should be fine, but I'm not sure how it shows the missing symbols.

You might also be able to run dumpbin /imports _path.cp311-win_amd64.pyd from the MSVC command prompt.

@story645
Copy link
Member

story645 commented Nov 8, 2023

Out of curiosity, do you get the same error when you try to import Matplotlib outside the repo?

@schtandard
Copy link
Author

Using the editable install, it should be in D:\Projekte\miscellaneous_git_repos\matplotlib\build\cp311\src\_path.cp311-win_amd64.pyd. I think the GUI should be fine, but I'm not sure how it shows the missing symbols.

Ok, I did that. I got

Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: A circular dependency was detected.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

and in the module list I got

Error opening file. The system cannot find the file specified (2).

for each of the following files (sorry, long list):

API-MS-WIN-CORE-APIQUERY-L1-1-0.DLL
API-MS-WIN-CORE-APPCOMPAT-L1-1-0.DLL
API-MS-WIN-CORE-APPCOMPAT-L1-1-1.DLL
API-MS-WIN-CORE-APPINIT-L1-1-0.DLL
API-MS-WIN-CORE-ATOMS-L1-1-0.DLL
API-MS-WIN-CORE-COMM-L1-1-0.DLL
API-MS-WIN-CORE-CONSOLE-L1-2-1.DLL
API-MS-WIN-CORE-CONSOLE-L2-1-0.DLL
API-MS-WIN-CORE-CONSOLE-L2-2-0.DLL
API-MS-WIN-CORE-CONSOLE-L3-2-0.DLL
API-MS-WIN-CORE-CRT-L1-1-0.DLL
API-MS-WIN-CORE-CRT-L2-1-0.DLL
API-MS-WIN-CORE-DATETIME-L1-1-1.DLL
API-MS-WIN-CORE-DATETIME-L1-1-2.DLL
API-MS-WIN-CORE-DEBUG-L1-1-1.DLL
API-MS-WIN-CORE-DELAYLOAD-L1-1-0.DLL
API-MS-WIN-CORE-DELAYLOAD-L1-1-1.DLL
API-MS-WIN-CORE-ERRORHANDLING-L1-1-2.DLL
API-MS-WIN-CORE-ERRORHANDLING-L1-1-3.DLL
API-MS-WIN-CORE-FIBERS-L2-1-0.DLL
API-MS-WIN-CORE-FIBERS-L2-1-1.DLL
API-MS-WIN-CORE-FILE-L1-2-1.DLL
API-MS-WIN-CORE-FILE-L1-2-2.DLL
API-MS-WIN-CORE-FILE-L1-2-4.DLL
API-MS-WIN-CORE-FILE-L2-1-1.DLL
API-MS-WIN-CORE-FILE-L2-1-2.DLL
API-MS-WIN-CORE-FILE-L2-1-3.DLL
API-MS-WIN-CORE-HEAP-L2-1-0.DLL
API-MS-WIN-CORE-HEAP-OBSOLETE-L1-1-0.DLL
API-MS-WIN-CORE-IO-L1-1-0.DLL
API-MS-WIN-CORE-IO-L1-1-1.DLL
API-MS-WIN-CORE-JOB-L1-1-0.DLL
API-MS-WIN-CORE-KERNEL32-LEGACY-L1-1-0.DLL
API-MS-WIN-CORE-KERNEL32-LEGACY-L1-1-1.DLL
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-LARGEINTEGER-L1-1-0.DLL
API-MS-WIN-CORE-LIBRARYLOADER-L1-2-0.DLL
API-MS-WIN-CORE-LIBRARYLOADER-L1-2-1.DLL
API-MS-WIN-CORE-LIBRARYLOADER-L1-2-2.DLL
API-MS-WIN-CORE-LIBRARYLOADER-L1-2-3.DLL
API-MS-WIN-CORE-LIBRARYLOADER-L2-1-0.DLL
API-MS-WIN-CORE-LOCALIZATION-L2-1-0.DLL
API-MS-WIN-CORE-LOCALIZATION-OBSOLETE-L1-2-0.DLL
API-MS-WIN-CORE-LOCALIZATION-PRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-MEMORY-L1-1-1.DLL
API-MS-WIN-CORE-MEMORY-L1-1-2.DLL
API-MS-WIN-CORE-MEMORY-L1-1-3.DLL
API-MS-WIN-CORE-MISC-L1-1-0.DLL
API-MS-WIN-CORE-NAMEDPIPE-L1-2-1.DLL
API-MS-WIN-CORE-NAMEDPIPE-L1-2-2.DLL
API-MS-WIN-CORE-NAMESPACE-L1-1-0.DLL
API-MS-WIN-CORE-NORMALIZATION-L1-1-0.DLL
API-MS-WIN-CORE-PCW-L1-1-0.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-0.DLL
API-MS-WIN-CORE-PROCESSENVIRONMENT-L1-2-0.DLL
API-MS-WIN-CORE-PROCESSSNAPSHOT-L1-1-0.DLL
API-MS-WIN-CORE-PROCESSTHREADS-L1-1-2.DLL
API-MS-WIN-CORE-PROCESSTHREADS-L1-1-3.DLL
API-MS-WIN-CORE-PROCESSTOPOLOGY-L1-1-0.DLL
API-MS-WIN-CORE-PSAPI-ANSI-L1-1-0.DLL
API-MS-WIN-CORE-PSAPI-L1-1-0.DLL
API-MS-WIN-CORE-REALTIME-L1-1-0.DLL
API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL
API-MS-WIN-CORE-REGISTRY-L1-1-1.DLL
API-MS-WIN-CORE-REGISTRY-L1-1-2.DLL
API-MS-WIN-CORE-RTLSUPPORT-L1-2-2.DLL
API-MS-WIN-CORE-SIDEBYSIDE-L1-1-0.DLL
API-MS-WIN-CORE-STRING-L2-1-0.DLL
API-MS-WIN-CORE-STRING-OBSOLETE-L1-1-0.DLL
API-MS-WIN-CORE-STRINGANSI-L1-1-0.DLL
API-MS-WIN-CORE-SYNCH-L1-2-1.DLL
API-MS-WIN-CORE-SYSINFO-L1-2-0.DLL
API-MS-WIN-CORE-SYSINFO-L1-2-1.DLL
API-MS-WIN-CORE-SYSINFO-L1-2-3.DLL
API-MS-WIN-CORE-SYSTEMTOPOLOGY-L1-1-0.DLL
API-MS-WIN-CORE-SYSTEMTOPOLOGY-L1-1-1.DLL
API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL
API-MS-WIN-CORE-THREADPOOL-LEGACY-L1-1-0.DLL
API-MS-WIN-CORE-THREADPOOL-PRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-WINDOWSERRORREPORTING-L1-1-0.DLL
API-MS-WIN-CORE-WINDOWSERRORREPORTING-L1-1-1.DLL
API-MS-WIN-CORE-WINDOWSERRORREPORTING-L1-1-2.DLL
API-MS-WIN-CORE-WINDOWSERRORREPORTING-L1-1-3.DLL
API-MS-WIN-CORE-WOW64-L1-1-0.DLL
API-MS-WIN-CORE-WOW64-L1-1-1.DLL
API-MS-WIN-CORE-WOW64-L1-1-3.DLL
API-MS-WIN-CORE-XSTATE-L2-1-0.DLL
API-MS-WIN-CORE-XSTATE-L2-1-1.DLL
API-MS-WIN-CORE-XSTATE-L2-1-2.DLL
API-MS-WIN-EVENTING-CONSUMER-L1-1-0.DLL
API-MS-WIN-EVENTING-CONSUMER-L1-1-1.DLL
API-MS-WIN-EVENTING-CONTROLLER-L1-1-0.DLL
API-MS-WIN-EVENTING-PROVIDER-L1-1-0.DLL
API-MS-WIN-GDI-INTERNAL-UAP-L1-1-0.DLL
API-MS-WIN-SECURITY-APPCONTAINER-L1-1-0.DLL
API-MS-WIN-SECURITY-AUDIT-L1-1-0.DLL
API-MS-WIN-SECURITY-AUDIT-L1-1-1.DLL
API-MS-WIN-SECURITY-BASE-L1-1-0.DLL
API-MS-WIN-SECURITY-BASE-L1-2-0.DLL
API-MS-WIN-SECURITY-BASE-PRIVATE-L1-1-0.DLL
API-MS-WIN-SERVICE-CORE-L1-1-0.DLL
API-MS-WIN-SERVICE-CORE-L1-1-1.DLL
API-MS-WIN-SERVICE-CORE-L1-1-2.DLL
API-MS-WIN-SERVICE-MANAGEMENT-L1-1-0.DLL
API-MS-WIN-SERVICE-MANAGEMENT-L2-1-0.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-0.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-2.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-3.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-4.DLL
API-MS-WIN-SERVICE-WINSVC-L1-1-0.DLL
API-MS-WIN-STATESEPARATION-HELPERS-L1-1-0.DLL
PYTHON311.DLL
API-MS-WIN-APPMODEL-ADVERTISINGID-L1-1-0.DLL
API-MS-WIN-APPMODEL-IDENTITY-L1-2-0.DLL
API-MS-WIN-APPMODEL-RUNTIME-INTERNAL-L1-1-2.DLL
API-MS-WIN-APPMODEL-RUNTIME-INTERNAL-L1-1-7.DLL
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-APPMODEL-RUNTIME-L1-1-1.DLL
API-MS-WIN-APPMODEL-STATE-L1-2-0.DLL
API-MS-WIN-APPMODEL-UNLOCK-L1-1-0.DLL
API-MS-WIN-CORE-APIQUERY-L2-1-0.DLL
API-MS-WIN-CORE-COM-L1-1-0.DLL
API-MS-WIN-CORE-COM-L1-1-1.DLL
API-MS-WIN-CORE-COM-L2-1-1.DLL
API-MS-WIN-CORE-COM-MIDLPROXYSTUB-L1-1-0.DLL
API-MS-WIN-CORE-COM-PRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-COMMANDLINETOARGV-L1-1-0.DLL
API-MS-WIN-CORE-DEBUG-MINIDUMP-L1-1-0.DLL
API-MS-WIN-CORE-ERRORHANDLING-L1-1-1.DLL
API-MS-WIN-CORE-FEATURESTAGING-L1-1-0.DLL
API-MS-WIN-CORE-FIBERS-L1-1-1.DLL
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-LOCALIZATION-L1-1-0.DLL
API-MS-WIN-CORE-LOCALIZATION-L1-2-2.DLL
API-MS-WIN-CORE-LOCALIZATION-L1-2-3.DLL
API-MS-WIN-CORE-LOCALREGISTRY-L1-1-0.DLL
API-MS-WIN-CORE-MARSHAL-L1-1-0.DLL
API-MS-WIN-CORE-PATH-L1-1-0.DLL
API-MS-WIN-CORE-PERFCOUNTERS-L1-1-0.DLL
API-MS-WIN-CORE-PROCESSTOPOLOGY-OBSOLETE-L1-1-0.DLL
API-MS-WIN-CORE-PSM-APP-L1-1-0.DLL
API-MS-WIN-CORE-PSM-KEY-L1-1-0.DLL
API-MS-WIN-CORE-PSM-KEY-L1-1-3.DLL
API-MS-WIN-CORE-PSM-RTIMER-L1-1-1.DLL
API-MS-WIN-CORE-QUIRKS-L1-1-0.DLL
API-MS-WIN-CORE-REALTIME-L1-1-1.DLL
API-MS-WIN-CORE-REGISTRY-L2-1-0.DLL
API-MS-WIN-CORE-REGISTRY-PRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-REGISTRYUSERSPECIFIC-L1-1-0.DLL
API-MS-WIN-CORE-SHLWAPI-LEGACY-L1-1-0.DLL
API-MS-WIN-CORE-SHLWAPI-OBSOLETE-L1-1-0.DLL
API-MS-WIN-CORE-STRING-L2-1-1.DLL
API-MS-WIN-CORE-SYNCH-ANSI-L1-1-0.DLL
API-MS-WIN-CORE-SYSINFO-L2-1-0.DLL
API-MS-WIN-CORE-THREADPOOL-L1-1-0.DLL
API-MS-WIN-CORE-TOOLHELP-L1-1-0.DLL
API-MS-WIN-CORE-URL-L1-1-0.DLL
API-MS-WIN-CORE-VERSION-L1-1-0.DLL
API-MS-WIN-CORE-VERSION-L1-1-1.DLL
API-MS-WIN-CORE-VERSION-PRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-1.DLL
API-MS-WIN-CORE-WINRT-ERRORPRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-PROPERTYSETPRIVATE-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-PROPERTYSETPRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-WINRT-REGISTRATION-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-COREUI-SECRUNTIME-L1-1-0.DLL
API-MS-WIN-DEVICES-CONFIG-L1-1-1.DLL
API-MS-WIN-DEVICES-QUERY-L1-1-0.DLL
API-MS-WIN-DOWNLEVEL-ADVAPI32-L1-1-0.DLL
API-MS-WIN-DOWNLEVEL-KERNEL32-L1-1-0.DLL
API-MS-WIN-DX-D3DKMT-L1-1-0.DLL
API-MS-WIN-DX-D3DKMT-L1-1-1.DLL
API-MS-WIN-DX-D3DKMT-L1-1-3.DLL
API-MS-WIN-DX-D3DKMT-L1-1-4.DLL
API-MS-WIN-DX-D3DKMT-L1-1-7.DLL
API-MS-WIN-EVENTING-CLASSICPROVIDER-L1-1-0.DLL
API-MS-WIN-EVENTING-LEGACY-L1-1-0.DLL
API-MS-WIN-EVENTING-OBSOLETE-L1-1-0.DLL
API-MS-WIN-EVENTING-TDH-L1-1-0.DLL
API-MS-WIN-EVENTLOG-LEGACY-L1-1-0.DLL
API-MS-WIN-GDI-DPIINFO-L1-1-0.DLL
API-MS-WIN-HTTP-TIME-L1-1-0.DLL
API-MS-WIN-NETWORKING-INTERFACECONTEXTS-L1-1-0.DLL
API-MS-WIN-NTUSER-RECTANGLE-L1-1-0.DLL
API-MS-WIN-NTUSER-SYSPARAMS-L1-1-0.DLL
API-MS-WIN-OLE32-IE-L1-1-0.DLL
API-MS-WIN-OOBE-NOTIFICATION-L1-1-0.DLL
API-MS-WIN-POWER-BASE-L1-1-0.DLL
API-MS-WIN-POWER-SETTING-L1-1-0.DLL
API-MS-WIN-PRIVACY-COREPRIVACYSETTINGSSTORE-L1-1-0.DLL
API-MS-WIN-RO-TYPERESOLUTION-L1-1-1.DLL
API-MS-WIN-RTCORE-NTUSER-CLIPBOARD-L1-1-0.DLL
API-MS-WIN-RTCORE-NTUSER-PRIVATE-L1-1-0.DLL
API-MS-WIN-RTCORE-NTUSER-PRIVATE-L1-1-11.DLL
API-MS-WIN-RTCORE-NTUSER-PRIVATE-L1-1-2.DLL
API-MS-WIN-RTCORE-NTUSER-PRIVATE-L1-1-4.DLL
API-MS-WIN-RTCORE-NTUSER-PRIVATE-L1-1-7.DLL
API-MS-WIN-RTCORE-NTUSER-PRIVATE-L1-1-9.DLL
API-MS-WIN-RTCORE-NTUSER-SHELL-L1-1-0.DLL
API-MS-WIN-RTCORE-NTUSER-SYNCH-L1-1-0.DLL
API-MS-WIN-RTCORE-NTUSER-WINDOW-L1-1-0.DLL
API-MS-WIN-SECURITY-ACCESSHLPR-L1-1-0.DLL
API-MS-WIN-SECURITY-ACTIVEDIRECTORYCLIENT-L1-1-0.DLL
API-MS-WIN-SECURITY-ACTIVEDIRECTORYCLIENT-L1-1-1.DLL
API-MS-WIN-SECURITY-BASE-L1-2-1.DLL
API-MS-WIN-SECURITY-BASE-PRIVATE-L1-1-1.DLL
API-MS-WIN-SECURITY-CAPABILITY-L1-1-0.DLL
API-MS-WIN-SECURITY-CREDENTIALS-L1-1-0.DLL
API-MS-WIN-SECURITY-CREDENTIALS-L2-1-0.DLL
API-MS-WIN-SECURITY-CREDENTIALS-L2-1-1.DLL
API-MS-WIN-SECURITY-CRYPTOAPI-L1-1-0.DLL
API-MS-WIN-SECURITY-GROUPPOLICY-L1-1-0.DLL
API-MS-WIN-SECURITY-ISOLATEDCONTAINER-L1-1-0.DLL
API-MS-WIN-SECURITY-ISOLATIONPOLICY-L1-2-0.DLL
API-MS-WIN-SECURITY-LOGON-L1-1-0.DLL
API-MS-WIN-SECURITY-LSALOOKUP-ANSI-L2-1-0.DLL
API-MS-WIN-SECURITY-LSALOOKUP-L1-1-0.DLL
API-MS-WIN-SECURITY-LSALOOKUP-L1-1-1.DLL
API-MS-WIN-SECURITY-LSALOOKUP-L1-1-2.DLL
API-MS-WIN-SECURITY-LSALOOKUP-L2-1-0.DLL
API-MS-WIN-SECURITY-LSAPOLICY-L1-1-0.DLL
API-MS-WIN-SECURITY-PROVIDER-L1-1-0.DLL
API-MS-WIN-SECURITY-SDDL-ANSI-L1-1-0.DLL
API-MS-WIN-SECURITY-SDDL-L1-1-0.DLL
API-MS-WIN-SECURITY-SDDLPARSECOND-L1-1-0.DLL
API-MS-WIN-SECURITY-SYSTEMFUNCTIONS-L1-1-0.DLL
API-MS-WIN-SECURITY-TRUSTEE-L1-1-0.DLL
API-MS-WIN-SERVICE-CORE-L1-1-4.DLL
API-MS-WIN-SHCORE-COMHELPERS-L1-1-0.DLL
API-MS-WIN-SHCORE-OBSOLETE-L1-1-0.DLL
API-MS-WIN-SHCORE-PATH-L1-1-0.DLL
API-MS-WIN-SHCORE-REGISTRY-L1-1-0.DLL
API-MS-WIN-SHCORE-STREAM-L1-1-0.DLL
API-MS-WIN-SHCORE-STREAM-WINRT-L1-1-0.DLL
API-MS-WIN-SHCORE-SYSINFO-L1-1-0.DLL
API-MS-WIN-SHCORE-TASKPOOL-L1-1-0.DLL
API-MS-WIN-SHCORE-THREAD-L1-1-0.DLL
API-MS-WIN-SHCORE-UNICODEANSI-L1-1-0.DLL
API-MS-WIN-SHELL-CHANGENOTIFY-L1-1-0.DLL
API-MS-WIN-SHELL-NAMESPACE-L1-1-0.DLL
API-MS-WIN-SHELL-SHDIRECTORY-L1-1-0.DLL
API-MS-WIN-SHELL-SHELLFOLDERS-L1-1-0.DLL
API-MS-WIN-SHLWAPI-IE-L1-1-0.DLL
API-MS-WIN-SHLWAPI-WINRT-STORAGE-L1-1-1.DLL
EXT-MS-MF-PAL-L2-1-0.DLL
EXT-MS-ONECORE-APPMODEL-DEPLOYMENT-INTERNAL-L1-1-0.DLL
EXT-MS-ONECORE-APPMODEL-STATEREPOSITORY-CACHE-L1-1-0.DLL
EXT-MS-ONECORE-APPMODEL-STATEREPOSITORY-CACHE-L1-1-2.DLL
EXT-MS-ONECORE-APPMODEL-STATEREPOSITORY-CACHE-L1-1-4.DLL
EXT-MS-ONECORE-APPMODEL-STATEREPOSITORY-INTERNAL-L1-1-3.DLL
EXT-MS-ONECORE-APPMODEL-STATEREPOSITORY-INTERNAL-L1-1-4.DLL
EXT-MS-ONECORE-APPMODEL-STATEREPOSITORY-INTERNAL-L1-1-6.DLL
EXT-MS-ONECORE-DCOMP-L1-1-0.DLL
EXT-MS-ONECORE-ORIENTATION-L1-1-0.DLL
EXT-MS-ONECORE-SHELLCHROMEAPI-L1-1-0.DLL
EXT-MS-WIN-ADSI-ACTIVEDS-L1-1-0.DLL
EXT-MS-WIN-ADVAPI32-MSI-L1-1-0.DLL
EXT-MS-WIN-ADVAPI32-NPUSERNAME-L1-1-0.DLL
EXT-MS-WIN-ADVAPI32-NTMARTA-L1-1-0.DLL
EXT-MS-WIN-ADVAPI32-PSM-APP-L1-1-0.DLL
EXT-MS-WIN-ADVAPI32-REGISTRY-L1-1-0.DLL
EXT-MS-WIN-ADVAPI32-REGISTRY-L1-1-1.DLL
EXT-MS-WIN-ADVAPI32-SAFER-L1-1-0.DLL
EXT-MS-WIN-APPCOMPAT-AEINV-L1-1-0.DLL
EXT-MS-WIN-APPCOMPAT-AEPIC-L1-1-0.DLL
EXT-MS-WIN-APPCOMPAT-APPHELP-L1-1-0.DLL
EXT-MS-WIN-APPMODEL-APPEXECUTIONALIAS-L1-1-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-MS-WIN-RTCORE-NTUSER-IAM-L1-1-0.DLL
EXT-MS-WIN-RTCORE-NTUSER-INTEGRATION-L1-1-0.DLL
EXT-MS-WIN-RTCORE-NTUSER-SYNCH-EXT-L1-1-0.DLL
EXT-MS-WIN-RTCORE-NTUSER-SYSPARAMS-L1-1-0.DLL
EXT-MS-WIN-RTCORE-NTUSER-WINDOW-EXT-L1-1-0.DLL
EXT-MS-WIN-SAMSRV-ACCOUNTSTORE-L1-1-0.DLL
EXT-MS-WIN-SECUR32-TRANSLATENAME-L1-1-0.DLL
EXT-MS-WIN-SECURITY-CAPAUTHZ-L1-1-0.DLL
EXT-MS-WIN-SECURITY-CAPAUTHZ-L1-1-1.DLL
EXT-MS-WIN-SECURITY-CHAMBERS-L1-1-0.DLL
EXT-MS-WIN-SECURITY-CREDUI-INTERNAL-L1-1-0.DLL
EXT-MS-WIN-SECURITY-CREDUI-L1-1-0.DLL
EXT-MS-WIN-SECURITY-CRYPTUI-L1-1-0.DLL
EXT-MS-WIN-SECURITY-CRYPTUI-L1-1-1.DLL
EXT-MS-WIN-SECURITY-EFS-L1-1-0.DLL
EXT-MS-WIN-SECURITY-EFSWRT-L1-1-0.DLL
EXT-MS-WIN-SECURITY-LSAADT-L1-1-0.DLL
EXT-MS-WIN-SECURITY-LSAADTPRIV-L1-1-0.DLL
EXT-MS-WIN-SECURITY-LSAAUDITRPC-L1-1-0.DLL
EXT-MS-WIN-SECURITY-NGC-LOCAL-L1-1-0.DLL
EXT-MS-WIN-SECURITY-VAULTCLI-L1-1-0.DLL
EXT-MS-WIN-SECURITY-WINSCARD-L1-1-0.DLL
EXT-MS-WIN-SECURITY-WINSCARD-L1-1-1.DLL
EXT-MS-WIN-SESSION-USERMGR-L1-1-0.DLL
EXT-MS-WIN-SESSION-USERTOKEN-L1-1-0.DLL
EXT-MS-WIN-SESSION-WINSTA-L1-1-0.DLL
EXT-MS-WIN-SESSION-WTSAPI32-L1-1-0.DLL
EXT-MS-WIN-SESSION-WTSAPI32-L1-1-1.DLL
EXT-MS-WIN-SHELL-DIRECTORY-L1-1-0.DLL
EXT-MS-WIN-SHELL-EMBEDDEDMODE-L1-1-0.DLL
EXT-MS-WIN-SHELL-SHELL32-L1-2-0.DLL
EXT-MS-WIN-SHELL-SHLWAPI-L1-1-0.DLL
EXT-MS-WIN-SHELL32-SHELLCOM-L1-1-0.DLL
EXT-MS-WIN-SHELL32-SHELLFOLDERS-L1-1-0.DLL
EXT-MS-WIN-SMBSHARE-BROWSERCLIENT-L1-1-0.DLL
EXT-MS-WIN-SXS-OLEAUTOMATION-L1-1-0.DLL
EXT-MS-WIN-SYSMAIN-PLMAPI-L1-1-0.DLL
EXT-MS-WIN-UI-VIEWMANAGEMENT-L1-1-0.DLL
EXT-MS-WIN-WER-UI-L1-1-0.DLL
EXT-MS-WIN-WER-XBOX-L1-1-0.DLL
EXT-MS-WIN-WER-XBOX-L1-1-2.DLL
EXT-MS-WIN-WER-XBOX-L1-1-3.DLL
EXT-MS-WIN-WER-XBOX-L1-1-4.DLL
EXT-MS-WIN-WEVTAPI-EVENTLOG-L1-1-0.DLL
EXT-MS-WIN-WEVTAPI-EVENTLOG-L1-1-2.DLL
EXT-MS-WIN-WEVTAPI-EVENTLOG-L1-1-3.DLL
EXT-MS-WIN-WINRT-DEVICE-ACCESS-L1-1-0.DLL
EXT-MS-WIN-WINRT-STORAGE-WIN32BROKER-L1-1-0.DLL
EXT-MS-WIN-WLAN-SCARD-L1-1-0.DLL
EXT-MS-WIN-WWAN-WWAPI-L1-1-0.DLL
EXT-MS-WIN-WWAN-WWAPI-L1-1-1.DLL
EXT-MS-WIN32-SUBSYSTEM-QUERY-L1-1-0.DLL
EXT-MS-WINDOWSCORE-DEVICEINFO-L1-1-0.DLL
WPAXHOLDER.DLL

You might also be able to run dumpbin /imports _path.cp311-win_amd64.pyd from the MSVC command prompt.

Here's the output:

D:\Projekte\miscellaneous_git_repos\matplotlib\build\cp311\src>dumpbin /imports _path.cp311-win_amd64.pyd
Microsoft (R) COFF/PE Dumper Version 14.37.32825.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file _path.cp311-win_amd64.pyd

File Type: DLL

  Section contains the following imports:

    libgcc_s_seh-1.dll
             1FB0793B8 Import Address Table
             1FB079078 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                           F _Unwind_Resume

    KERNEL32.dll
             1FB0793C8 Import Address Table
             1FB079088 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                         119 DeleteCriticalSection
                         13D EnterCriticalSection
                         274 GetLastError
                         37A InitializeCriticalSection
                         3D6 LeaveCriticalSection
                         57F Sleep
                         5A2 TlsGetValue
                         5D1 VirtualProtect
                         5D3 VirtualQuery

    msvcrt.dll
             1FB079418 Import Address Table
             1FB0790D8 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                          54 __iob_func
                          63 __setusermatherr
                          7C _amsg_exit
                          CF _errno
                         151 _initterm
                         1C0 _lock
                         343 _unlock
                         41E abort
                         41F acos
                         42F calloc
                         457 free
                         464 fwrite
                         49C memcpy
                         49D memmove
                         49E memset
                         4B3 realloc
                         4D3 strlen
                         4D6 strncmp
                         4F9 vfprintf

    libstdc++-6.dll
             1FB0794B8 Import Address Table
             1FB079178 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                         BAC _ZNSt13runtime_errorC1EPKc
                         BB6 _ZNSt13runtime_errorD1Ev
                        1128 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEyyPKcy
                        1151 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
                        1182 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEyyPKcy
                        1187 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEy
                        118A _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcy
                        118E _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEyyPKcy
                        1190 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc
                        14B2 _ZNSt9bad_allocD1Ev
                        14E2 _ZNSt9exceptionD2Ev
                        152E _ZSt17__throw_bad_allocv
                        1546 _ZSt20__throw_length_errorPKc
                        1557 _ZSt24__throw_out_of_range_fmtPKcz
                        155B _ZSt28__throw_bad_array_new_lengthv
                        18CC _ZTVN10__cxxabiv117__class_type_infoE
                        18D1 _ZTVN10__cxxabiv120__si_class_type_infoE
                        1992 _ZTVSt9bad_alloc
                        19F7 _ZdaPv
                        1A01 _ZdlPvy
                        1A03 _Znay
                        1A07 _Znwy
                        1A0E __cxa_allocate_exception
                        1A11 __cxa_begin_catch
                        1A17 __cxa_end_catch
                        1A19 __cxa_free_exception
                        1A22 __cxa_rethrow
                        1A23 __cxa_throw
                        1A35 __gxx_personality_seh0

    python311.dll
             1FB0795A8 Import Address Table
             1FB079268 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                          1E PyBytes_AsString
                          27 PyBytes_FromStringAndSize
                          3A PyCapsule_GetPointer
                          42 PyCapsule_Type
                          B2 PyErr_Clear
                          B6 PyErr_Format
                          BF PyErr_Occurred
                          C0 PyErr_Print
                          D9 PyErr_SetString
                          FD PyExc_AttributeError
                         114 PyExc_ImportError
                         11D PyExc_MemoryError
                         123 PyExc_OverflowError
                         12A PyExc_RuntimeError
                         134 PyExc_TypeError
                         13C PyExc_ValueError
                         150 PyFloat_AsDouble
                         198 PyImport_ImportModule
                         1B6 PyList_New
                         1B8 PyList_SetItem
                         1CB PyLong_FromLong
                         1EA PyMem_Free
                         209 PyModule_Create2
                         24A PyOS_double_to_string
                         24F PyOS_snprintf
                         27B PyObject_GetAttrString
                         280 PyObject_HasAttrString
                         288 PyObject_IsTrue
                         2BD PySequence_Check
                         2C4 PySequence_GetItem
                         2CF PySequence_Size
                         2D0 PySequence_Tuple
                         36C PyUnicode_AsASCIIString
                         43D _PyArg_ParseTupleAndKeywords_SizeT
                         43E _PyArg_ParseTuple_SizeT
                         515 _PyObject_CallMethod_SizeT
                         5D4 _Py_BuildValue_SizeT
                         5DA _Py_Dealloc
                         5EA _Py_FalseStruct
                         60A _Py_NoneStruct
                         615 _Py_TrueStruct

  Summary

        1000 .CRT
        1000 .bss
        1000 .data
        3000 .debug_abbrev
        1000 .debug_aranges
        1000 .debug_frame
        B000 .debug_info
        3000 .debug_line
        3000 .debug_line_str
        3000 .debug_loclists
        1000 .debug_rnglists
        1000 .debug_str
        1000 .edata
        2000 .idata
        1000 .pdata
        3000 .rdata
        1000 .reloc
       1F000 .text
        1000 .tls
        2000 .xdata

@schtandard
Copy link
Author

Out of curiosity, do you get the same error when you try to import Matplotlib outside the repo?

Yes, same thing.

@QuLogic
Copy link
Member

QuLogic commented Nov 8, 2023

libgcc_s_seh-1.dll
libstdc++-6.dll

This extension was compiled with gcc. Did you install the gcc compilers from conda? (Our environment.yml doesn't do that.) Or were you planning to use MSVC? I think you might have Strawberry Perl installed, which is failing the same way as #27168 (comment).

@schtandard
Copy link
Author

This extension was compiled with gcc. Did you install the gcc compilers from conda? (Our environment.yml doesn't do that.) Or were you planning to use MSVC?

No, I used gcc from MSYS2 (on purpose). My understanding from the docs was that this should also work. Or did I misunderstand something?

I did try it with MSVC instead now and that seems to work. But reading about the build dependencies again it still seems to me that gcc should work as an alternative..

I think you might have Strawberry Perl installed, which is failing the same way as #27168 (comment).

I do not have Strawberry Perl installed, no. (Though it is possible that I did in the past; I'm not sure. Could that still cause problems?)

@QuLogic
Copy link
Member

QuLogic commented Nov 8, 2023

No, I used gcc from MSYS2 (on purpose). My understanding from the docs was that this should also work. Or did I misunderstand something?

You have understood correctly; it should be allowed, but I don't think it has been tested or confirmed to work. But that's why we don't pass --vsenv by default.

Since the imports seem to list some MSYS2 DLLs, but Dependency Walker can't find them, I think you would need to ensure your MSYS2 DLL directories are in your PATH.

You might also be able to pass -static-libstdc++ to gcc so it bundles the libraries, but that's definitely in untested waters.

@schtandard
Copy link
Author

Since the imports seem to list some MSYS2 DLLs, but Dependency Walker can't find them, I think you would need to ensure your MSYS2 DLL directories are in your PATH.

C:\msys64\mingw64\bin is in my PATH, but there aren't many DLLs there. There are a lot of subfolders in the msys64 directory with DLLs, so it seems impractical to add all of them.

You might also be able to pass -static-libstdc++ to gcc so it bundles the libraries, but that's definitely in untested waters.

Ok, thanks for all of your pointers. I think I will stick with MSVC for now, as that seems to work.

Feel free to close this issue or leave it open if you want to do something about this on your end. I'm happy to help by testing but I fear that I can't be much help other than that.

@doronbehar
Copy link
Contributor

I'm experiencing a similar error on NixOS:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/doron/repos/matplotlib/lib/matplotlib/__init__.py", line 159, in <module>
    from . import _api, _version, cbook, _docstring, rcsetup
  File "/home/doron/repos/matplotlib/lib/matplotlib/rcsetup.py", line 28, in <module>
    from matplotlib.colors import Colormap, is_color_like
  File "/home/doron/repos/matplotlib/lib/matplotlib/colors.py", line 57, in <module>
    from matplotlib import _api, _cm, cbook, scale
  File "/home/doron/repos/matplotlib/lib/matplotlib/scale.py", line 22, in <module>
    from matplotlib.ticker import (
  File "/home/doron/repos/matplotlib/lib/matplotlib/ticker.py", line 144, in <module>
    from matplotlib import transforms as mtransforms
  File "/home/doron/repos/matplotlib/lib/matplotlib/transforms.py", line 49, in <module>
    from matplotlib._path import (
ImportError: /home/doron/repos/matplotlib/build/cp311/src/_path.cpython-311-x86_64-linux-gnu.so: undefined symbol: _ZN3agg10curve3_div4initEdddddd

Where as:

nm -D build/cp311/src/_path.cpython-311-x86_64-linux-gnu.so | grep _ZN3agg10curve3_div4initEdddddd

Gives a non-empty result.

I also tried to run meson setup and meson compile and meson install myself, and got the same error.

@tacaswell
Copy link
Member

I'm going to close this as the original issues seems to be coming from a mixed build chain (mingw gcc + conda).

@doronbehar I suspect you have a very different problem. I would first try git clean -xfd and installing to see if that fixes it. If not, please open a new issue with details of how you have python / venv setup.

@tacaswell tacaswell closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
@doronbehar
Copy link
Contributor

I suspect it is a similar issue, because it may be related to building matplotlib slightly different then how you are used to do it and how you recommend doing it in your docs (on NixOS I just don't have a choice). More details are in this discourse thread:

https://discourse.matplotlib.org/t/having-trouble-setting-up-a-development-environment-and-running-tests-on-nixos/24471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants