所以我正在尝试按照建议通过 pipx 安装 eth-brownie,这在 Windows 上。我尝试了一切,还多次重新安装了包括 python 在内的一切。这个错误对我来说是无法修复的,谷歌搜索也无济于事。
PS C:\Users\XXXX\Desktop\solidity> python -m pipx install eth-brownie
回溯(最后一次调用):文件“C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\runpy.py”,第 196 行,在 _run_module_as_main 返回 _run_code(code, main_globals, None,文件“C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\runpy.py”,第 86 行,run_code exec(code, run_globals) 文件“C:\Users\XXXX\AppData\ Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ pipx_main.py”,第 14 行,在 sys.exit(cli()) 文件“C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ pipx\main.py”,第 779 行,在 cli 中返回 run_pipx_command(parsed_pipx_args) 文件“C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages \pipx\main.py",第 202 行,在 run_pipx_command 返回 commands.install( 文件 "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site- packages\pipx\commands\install.py”,第 60 行,在安装 venv.install_package(文件“C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\venv.py”,第 238 行,在 install_package subprocess_post_check_handle_pip_error(pip_process) 文件“C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10 _qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\util.py”,第 349 行,在 subprocess_post_check_handle_pip_error print(completed_process.stderr, file=pip_error_fh, end="") 文件“C:\Program Files\WindowsApps \PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py",第 19 行,编码返回 codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can' t 在位置 559 对字符 '\u2502' 进行编码:字符映射到在 install_package subprocess_post_check_handle_pip_error(pip_process) 文件“C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\util.py”文件中,第 349 行,在 subprocess_post_check_handle_pip_error print(completed_process.stderr, file=pip_error_fh, end="") 文件“C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py”,第 19 行,在编码返回 codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 559: character maps to在 install_package subprocess_post_check_handle_pip_error(pip_process) 文件“C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\util.py”文件中,第 349 行,在 subprocess_post_check_handle_pip_error print(completed_process.stderr, file=pip_error_fh, end="") 文件“C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py”,第 19 行,在编码返回 codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 559: character maps to10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\util.py",第 349 行,在 subprocess_post_check_handle_pip_error print(completed_process.stderr, file=pip_error_fh, end="") 文件 "C:\Program Files\WindowsApps \PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py",第 19 行,编码返回 codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can' t 在位置 559 对字符 '\u2502' 进行编码:字符映射到10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\util.py",第 349 行,在 subprocess_post_check_handle_pip_error print(completed_process.stderr, file=pip_error_fh, end="") 文件 "C:\Program Files\WindowsApps \PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py",第 19 行,编码返回 codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can' t 在位置 559 对字符 '\u2502' 进行编码:字符映射到0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py",第 19 行,编码返回 codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 559 : 字符映射到0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py",第 19 行,编码返回 codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 559 : 字符映射到
最后一次python安装是通过microsoft store,不要问我为什么,但是如果我通过正常方式下载python,这个错误是一样的。
如果有人可以帮助我,我将不胜感激。在我的笔记本电脑上运行良好,但它又旧又慢,所以需要在 PC 上使用。