在使用PIPX上安装Windows-Brownie时,如何解决此UnicenCodeError?

发布于 2025-01-21 16:33:36 字数 1733 浏览 0 评论 0原文

我试图在运行Anaconda Python的Windows 10 PC上安装Eth-Brownie。 Python版本为3.9倍,

我在此处遵循说明;

https://eth-brownie.readthedocs.io/en/en/stable/install。 html

我在下面运行了命令;

$ pipx install eth-brownie

我在下面收到错误。

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "c:\users\user\appdata\roaming\python\python39\scripts\pipx.exe\__main__.py", line 7, in <module>
    return run_pipx_command(parsed_pipx_args)
  File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\pipx\main.py", line 202, in run_pipx_command
    return commands.install(
  File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\pipx\commands\install.py", line 60, in install
    venv.install_package(
  File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\pipx\venv.py", line 238, in install_package
    subprocess_post_check_handle_pip_error(pip_process)
  File "C:\Users\user\AppData\Roaming\Python\Python39\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:\ProgramData\Anaconda3\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 104: character maps to <undefined>

I tried to install eth-brownie on a Windows 10 PC running anaconda python. Python version is 3.9x

I followed the instructions here;

https://eth-brownie.readthedocs.io/en/stable/install.html

I ran the command below;

$ pipx install eth-brownie

I received the error below.

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "c:\users\user\appdata\roaming\python\python39\scripts\pipx.exe\__main__.py", line 7, in <module>
    return run_pipx_command(parsed_pipx_args)
  File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\pipx\main.py", line 202, in run_pipx_command
    return commands.install(
  File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\pipx\commands\install.py", line 60, in install
    venv.install_package(
  File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\pipx\venv.py", line 238, in install_package
    subprocess_post_check_handle_pip_error(pip_process)
  File "C:\Users\user\AppData\Roaming\Python\Python39\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:\ProgramData\Anaconda3\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 104: character maps to <undefined>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

微凉徒眸意 2025-01-28 16:33:36

根据 pipx的错误报告,在

下面的步骤应解决您的问题:

  1. 安装Cython通过命令

      PIP安装Cython
     
  2. 运行命令安装软件包:

      pipx安装eth-brownie
     

如果以上不起作用,请尝试直接使用pip安装软件包:

pip install eth-brownie

According to this bug report on pipx's GitHub page, this was fixed in #811.

The steps below should solve your problem:

  1. Install cython via the command

     pip install cython
    
  2. Run the command to install the package:

     pipx install eth-brownie
    

If the above doesn't work, try directly using pip to install the package:

pip install eth-brownie
梦在夏天 2025-01-28 16:33:36

我遇到相同的错误并使用相同的系统配置。我正在使用运行Anaconda Python的Windows 10 PC。 Python版本为3.9倍,

这是我成功安装布朗尼的步骤。

来自 https://eth-brownie.readthedocs.io/en/stable/stable/stable/instable/instable/install 。

​github.com/pypa/pipx/issues/819“ rel =“ nofollow noreferrer”> https://github.com/pypa/pipx/pipx/issues/819 );

$ pip install -u git+https://github.com/pypa/pipx.git@main

在此阶段之后,我遇到了一个错误 - &gt;
无法打开的文件包括:'io.h':没有这样的文件或目录

解决方案是安装Windows 10 SDK。

修复程序的描述可以在此处找到; 无法打开文件:'io.h''io.h''' :没有这样的文件或目录

最后,可以使用以下命令成功安装eth-brownie;

$ pipx安装eth-brownie

I encountered the same error and use the same system configuration. I am using a Windows 10 PC running anaconda python. Python version is 3.9x

Here are the steps I run to install brownie successfully;

From https://eth-brownie.readthedocs.io/en/stable/install.html,

To install pipx:

$ python3 -m pip install --user pipx

$ python3 -m pipx ensurepath

To install a newer version of pipx that fixes the error reported (see https://github.com/pypa/pipx/issues/819);

$ pip install -U git+https://github.com/pypa/pipx.git@main

After this stage, I encountered one more error ->
Cannot open include file: 'io.h': No such file or directory

The solution was to install Windows 10 SDK.

The description of the fix can be found here; Cannot open include file: 'io.h': No such file or directory

Finally, eth-brownie can be installed successfully using the following command;

$ pipx install eth-brownie

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文