When the source code Matplotlib has the following parameters for setting Chinese or negative numbers, a NameError will appear in pyinstaller packaging: name ‘defaultparams’ is not defined error
plt.rcParams['font.sans-serif'] = ['STSong']
plt.rcParams['axes.unicode_minus'] = False
Solution:
Reduce Matplotlib to version 3.2.2
conda install matplotlib==3.2.2
Note: pyinstaller 3.6 version Python 3.6.13 version
Read More:
- NameError: name ‘null’ is not defined [How to Solve]
- “NameError: name ‘re’ is not defined” [How to Solve]
- Python error collection: NameError: name ‘numpy’ is not defined
- NameError: global name ‘***‘ is not defined [How to Solve]
- NameError: name ‘xrange‘ is not defined [How to Solve]
- [Solved] Python serializate error: NameError: name ‘JSON’ is not defined
- [Solved] Tensorflow Error: NameError: name ‘layers‘ is not defined
- Python parsing JSON Error: NameError: name ‘false’ is not defined
- NameError: name ‘_C‘ is not defined [How to Solve]
- Python+Selenium Error: AttributeError: ‘WebDriver‘ NameError: name ‘By‘ is not defined
- Crawler overtime error socket.timeout: timed out/NameError: name ‘socket‘ is not defined
- [Solved] selenium.common.exceptions.JavascriptException: Message: javascript error: windows is not defined
- [How to Fix]RuntimeError: Python is not installed as a framework, If you are using (Ana)Conda
- [Solved] Conda Upgrade Error: PackageNotInstalledError: Package is not installed in prefix.
- Python error: ‘int’ object is not callable
- [Solved] RuntimeError: Numpy is not available (Associated Torch or Tensorflow)
- [Solved] Pylint Warning: An attribute defined in json.encoder line 158 hides this methodpylint(method-hidden)
- [How to Solve] Python TypeError: ‘int‘ object is not subscriptable
- [Solved] Using Java to call jython Error: URI is not hierarchical
- Apex install error: the environment is not compatible