Problem description
After packaging Python scripts with pyinnstaller, the executable file reported an error modulenotfoundererror: no module named ‘cmath’. However, I did not use cmath. After checking, I found that cmath was implicitly imported by default after panda version 1.2 (there is a description link here), but pyinnstaller did not check that cmath needs to be executed in the scripts, So it’s not packaged into an executable.
Solution
- similar to the errors caused by the inclusion of pandas or other libraries mentioned above, you can try to change the version of the corresponding library and modify the packaged. Spec configuration file (such as modification method). If not many dependencies are missing, this simple method is recommended to display the package with import error prompt in your own script
Read More:
- About the problem of calling tools library by running Python program under Mac OS X, modulenotfoundererror: no module named ‘tools‘
- Record the python package EXE file running error importerror, but do not prompt specific error solution
- Record a problem of no module named ‘tensorflow. Examples’ and’ tensorflow. Examples. Tutorials’ in tensorflow 2.0
- Module not found error: the solution to the problem of no module named ‘MySQL’
- Importerror: the perfect solution of no module named CV2!!! (not too good)
- Jenkins reported an error modulenotfounderror: no module named filename solution
- Solve the problem of using in tensoft 2. X tf.contrib.slim No module named appears in the package: tensorflow.contrib problem
- Importerror: no module named typing error reporting solution (python2 PIP needs to be backed back from 21)
- Tensorflow operation report error modulenotfounderror: no module named ‘tensorflow. Python. Types’ solution
- Error importing keras in jupyter Notebook: modulenotfounderror: no module named ‘keras’ solution
- Python:ImportError: No module named indexes.base
- ImportError: No module named indexes.base
- Module not founderror: no module named ‘nets.ssd‘
- ModuleNotFoundError: No module named ‘ahocorasick‘ [100% Work Method]
- Error occurred when Python installed the pocketsphinx module (package): Command‘ swig.exe “Failed: no such file or directory
- ModuleNotFoundError: No module named xxx
- Unable to call numpy in pychar, module notfounderror: no module named ‘numpy’
- No module named sklearn.neighbors_ typedefs
- When python installs pocketsphinx module (package), an error is reported: command ‘swig.exe’ failed: No such file or directory
- ModuleNotFoundError: No module named ‘tensorflow_core.estimator‘