在使用PIPX上安装Windows-Brownie时,如何解决此UnicenCodeError?
我试图在运行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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据此
pipx
的错误报告,在下面的步骤应解决您的问题:
安装
Cython
通过命令运行命令安装软件包:
如果以上不起作用,请尝试直接使用
pip
安装软件包:According to this bug report on
pipx
's GitHub page, this was fixed in #811.The steps below should solve your problem:
Install
cython
via the commandRun the command to install the package:
If the above doesn't work, try directly using
pip
to install the package:我遇到相同的错误并使用相同的系统配置。我正在使用运行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