简体   繁体   中英

ETH-BROWNIE install issue - windows - pipx

So I am trying to install eth-brownie via pipx as recommended, this on Windows. I tried everything also multiple re-installs of EVERYTHING including python. This one error just isn't fixable for me and googling this doesn't help.

PS C:\Users\XXXX\Desktop\solidity> python -m pipx install eth-brownie

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\__main__.py", line 14, in <module>
    sys.exit(cli())
  File "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\main.py", line 779, in cli
    return run_pipx_command(parsed_pipx_args)
  File "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\main.py", line 202, in run_pipx_command
    return commands.install(
  File "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\commands\install.py", line 60, in install
    venv.install_package(
  File "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\venv.py", line 238, in install_package
    subprocess_post_check_handle_pip_error(pip_process)
  File "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\util.py", line 349, in subprocess_post_check_handle_pip_error
    print(completed_process.stderr, file=pip_error_fh, end="")
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 559: character maps to <undefined>

This last python install was via Microsoft store, don't ask me why, but this error is the same if I download python via the normal way.

If anyone can help me I would be very grateful. Works fine on my laptop, but it's an old and slow one so need it on PC.

I'm pretty sure I just did it using pip instead of pipx:

python -m pip install eth-brownie

I had the same problem with python version 3.10.2 Downgraded python to version 3.9.2, installation of eth-brownie using pipx works fine.

"UnicodeEncodeError" is not the real error. It is encoding error when the script was trying to print the real error.

To fix this fake error,

vi "C:\Users\XXXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pipx\util.py"
change from
   with pip_error_file.open("w") as pip_error_fh:
to
   with pip_error_file.open("w", encoding="utf-8") as pip_error_fh:

Then run your install script again, and you will see the REAL error.

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