简体   繁体   中英

C++ python module (based on Pybind11) import error: ModuleNotFoundError

A C++ python module based on pybind11 library cannot be imported anymore in python. It was working until a few weeks ago but not any more (may be since the installation of miniconda). Cannot track the exact point when this stopped working as I was not using it since many weeks. I start python in the same directory as the module, and tried to import it in the terminal. And I get the error:

ModuleNotFoundError: No module named 'ld_pybind_d'

In the mean while I also tried:

  • deleted the directory where miniconda was installed, rebuilt the module and linked it against python3.6m library.
  • Created an empty __ init__.py file in the module directory
  • Exported the current working directory in the PYTHONPATH environment variable

Other info:

  • Built 64 bit version module and I also have 64 bit version python
  • Python version 3.6.8

Nothing works.. Your help is very appreciated...

As is, many times the case, if nothing really works, a restart would definitely do. I did that and seems to solve the case. Never the less, im just relieved it is loading now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM