Today, I used swig to encapsulate the underlying C + + library. After the result was encapsulated, release was OK. However, in the debug mode, the import failed all the time, indicating that the module could not be found. Why did I fail when I had PYD?
After troubleshooting, PYD in the original debug mode must be added_ d
The result is to add_ D is solved; For example_ Somelib.pyd should be_ someLib_ d. PYD, so Python can import.
Modify cmakelists.txt to ensure that it is added in debug mode_ d
set(CMAKE_DEBUG_POSTFIX _d)
set_target_properties(${target_name} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
Read More:
- sqoop-import ERROR tool.ImportTool: Import failed: No primary key could be found for table user_info
- pip Import Error:cannot import Name main solution
- Solved! The new version of statsmodels has the problem of importerror: cannot import name ‘factorial’
- [error reported] [Python] [Matplotlib] importerror: failed to import any QT binding
- ImportError: numpy.core.multiarray failed to import
- Python import GDAL failed: DLL load failed. The specified module cannot be found.
- Android studio auto import auto import
- numpy.core.umath How to solve the problem of failed to import
- How to Fix gdb error: Failed to import the site module,No module named ‘_sysconfigdata_m’
- Tensorflow import error: DLL load failed: the specified module could not be found
- [Vue warn]: Failed to resolve component vue3 import element error
- How to solve “import cv2 failed ImportError: DLL load fail: Cannot find the specified module” in Anaconda environment
- Jumper notebook, import numpy, prompt “importerror: DLL load failed: unable to find the specified module”
- Python_ Part 2 programming problems (3)_ solve numpy.core.multiarray Failed to import problem
- Imresize import error: cannot import name ‘imresize’
- Failed to import package with error: couldn’t decompress package
- Failed to import module __PyInstaller_hooks_0_IPython required by hook for module
- Does the version of idea2020.1 import mybayis jar package or report an error? Error: (4,28) Java: package org.apache.ibatis.io does not exist
- When VS code imported Cv2, an error ImportError: numpy.core.multiarray failed to import; There are no mistakes in using the Spyder
- How to import Python from relative path