简体   繁体   中英

My Pycharm can not connect to the console with “UnicodeDecodeError”

When I opened Pycharm, it failed to connect to the console. But I did nothing and got this error,

/anaconda3/python.app/Contents/MacOS/python "/Applications/PyCharm Edu.app/Contents/helpers/pydev/pydevconsole.py" --mode=client --port=49312
Failed to import the site module
Traceback (most recent call last):
  File "/anaconda3/python.app/Contents/lib/python3.6/site.py", line 541, in <module>
    main()
  File "/anaconda3/python.app/Contents/lib/python3.6/site.py", line 522, in main
    known_paths = addusersitepackages(known_paths)
  File "/anaconda3/python.app/Contents/lib/python3.6/site.py", line 285, in addusersitepackages
    addsitedir(user_site, known_paths)
  File "/anaconda3/python.app/Contents/lib/python3.6/site.py", line 207, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/anaconda3/python.app/Contents/lib/python3.6/site.py", line 163, in addpackage
    for n, line in enumerate(f):
  File "/anaconda3/python.app/Contents/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 25: ordinal not in range(128)
Process finished with exit code 1

I would make sure your Pycham is up to date. Make sure all the plugins are up to date(if your terminal works). To do this go to the link --> 1 . after that is up to date make sure your pip is up to date and that you are using you python 3.x if you have no reason to use a latter version.

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