Error message
Start Python 3.6 in the windows command line environment and report the following error
C:\Users\gaozh>python
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
File "C:\Anaconda3\lib\site.py", line 418, in register_readline
readline.read_history_file(history)
File "C:\Anaconda3\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file
self.mode._history.read_history_file(filename)
File "C:\Anaconda3\lib\site-packages\pyreadline\lineeditor\history.py", line 82, in read_history_file
for line in open(filename, 'r'):
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 407: illegal multibyte sequence
terms of settlement
The way to solve this problem is to modify the corresponding code in line 82 of the file C: \ anaconda3 \ lib \ site packages \ pyreadline \ lineeditor \ history. Py
, add the coding format as UTF-8
, and then restart python.
Reference articles
https://github.com/pyreadline/pyreadline/issues/38
Read More:
- Error in starting zookeeper in Windows: zookeeper audit is disabled
- An error occurred when starting pyspider with Python 3.7
- Installing PyQt4 in Windows + Python 3.6
- Error starting desktop problem when installing matlab on windows7
- Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using’”‘ in pip installation
- Installing sklearn (scikit learn) module related to Python machine learning in Windows
- Python windows error: [error 3] and common windows error errors
- Error starting peacock in manjaro [How to Solve]
- UTF-8 encoding error when starting robotframework ride
- Memory leak in Windows 8.1 with Killer E2200 and Windows Network Data Usage Monitoring
- Error running docker container: starting container process caused “exec: \“python\“: executable file
- Making Python script into exe command under Windows
- In Python, import XXX does not report an error, but in IPython (Jupiter notebook)
- Notes: Windows Python installation and removal error 2203 / 2502 / 2503
- [Solved] CAP_IMAGES: can‘t find starting number (in the name of file)
- Windows 10 installation python.msi Error 2502 / 2503 solution
- python: This application failed to stat could not find or load the Qt platform plugin “windows”
- The problem of “value error: zero length field name in format” in Python 2.6.6 of CentOS 6.9
- Resolve the problem of “event ID 4107” or “event ID 11” errors recorded in the application logs of windows and windows server
- Windows git review reported an error. UnicodeDecodeError