简体   繁体   English

我的 Pycharm 无法通过“UnicodeDecodeError”连接到控制台

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

When I opened Pycharm, it failed to connect to the console.当我打开 Pycharm 时,它无法连接到控制台。 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.我会确保你的 Pycham 是最新的。 Make sure all the plugins are up to date(if your terminal works).确保所有插件都是最新的(如果您的终端工作)。 To do this go to the link --> 1 .要做到这一点 go 到链接 --> 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.之后是最新的,请确保您的 pip 是最新的,并且如果您没有理由使用后一个版本,请确保您使用的是 python 3.x。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM