Module Not Found Error
See original GitHub issueI’m trying to make an executable file out of the python code below:
import cobra
import _libsbml
print(1)
However, I keep receiving the error message
ModuleNotFoundError: No module named '_libsbml'
Any ideas on how to solve this? The line “import _libsbml” was not in my original code. I added it while trying to solve this problem. I also added “_libsbml” on the “–hiddenimport” advanced field, but without results.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
ModuleNotFoundError: no module named Python Error [Fixed]
How to fix the ModuleNotFoundError in Python · 1. Make sure imported modules are installed · 2. Make sure modules are spelled correctly...
Read more >How to Fix ModuleNotFoundError and ImportError
How to fix ModuleNotFoundError and ImportError? · first make sure you are using absolute imports · export the project's root directory to ...
Read more >Python - Module Not Found - Stack Overflow
I got the error ModuleNotFoundError: No module named 'requests.adapters'; 'requests' is not a package. Turns out the file I created in the same...
Read more >Python ModuleNotFoundError Solution - Career Karma
The ModuleNotFoundError is raised when Python cannot locate an error. The most common cause of this error is forgetting to install a module...
Read more >Python Import Error (ModuleNotFoundError) - Finxter
Python's ImportError ( ModuleNotFoundError ) indicates that you tried to import a module that Python doesn't find. It can usually be eliminated by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you. Adding the module location to
--paths
solved the problem. Thank you very much.So adding
--debug all
to your command make this error occur when packaging the script? That’s odd.Typically you need to use
--hidden-import
when not using theimport
keyword, but looking back at your original script, you were using it, so using--hidden-import
probably won’t help - PyInstaller just can’t find the import.Maybe if you can locate where the .py associated with the import is, you could add it’s location to
--paths
to tell PyInstaller to look there.