Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install 模块时报错 UnicodeDecodeError #172

Closed
nobodxbodon opened this issue Apr 11, 2020 · 3 comments
Closed

pip install 模块时报错 UnicodeDecodeError #172

nobodxbodon opened this issue Apr 11, 2020 · 3 comments

Comments

@nobodxbodon
Copy link
Member

草蟒库安装报错但安装可用:

Installing collected packages: grasspy-modules
ERROR: Exception:
Traceback (most recent call last):
  File "[...]\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main
    status = self.run(options, args)
  File "[...]\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\commands\install.py", line 407, in run
    use_user_site=options.use_user_site,
  File "[...]\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\req\__init__.py", line 58, in install_given_reqs
    **kwargs
  File "[...]\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\req\req_install.py", line 928, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "[...]\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\req\req_install.py", line 461, in move_wheel_files
    warn_script_location=warn_script_location,
  File "[...]\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\wheel.py", line 613, in move_wheel_files
    generated=generated, lib_dir=lib_dir,
  File "[...]\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\wheel.py", line 281, in get_csv_rows_for_installed
    for row in old_csv_rows:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 4: illegal multibyte sequence

早先我以为是 readme 编码设置问题,但经确认,草蟒库中已有此设置。

今天又得到另一位中文库作者的类似问题报告:

\operations\install\wheel.py", line 614, in install_wheel
    warn_script_location=warn_script_location,
  File "c:\programdata\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal
\operations\install\wheel.py", line 584, in install_unpacked_wheel
    generated=generated, lib_dir=lib_dir,
  File "c:\programdata\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal
\operations\install\wheel.py", line 242, in get_csv_rows_for_installed
    for row in old_csv_rows:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 82: illegal multibyte sequence

两个问题都不妨碍模块正常运行,貌似。

仍需研究此问题是何原因,并向社区反映。

这里有个问题是因为包含中文资源,可参考。

@jeffreybaoshenlee
Copy link
Member

多試幾個操作系統?

我在 Windows 10 家庭中文版(版本號 1909 操作系統版本 18363.752)的 Ubuntu 子環境裡面,用 pip3 安裝,沒有出現這個錯誤。

@nobodxbodon
Copy link
Member Author

@jeffreybaoshenlee 的确,我的英文 mac 系统安装时也没报错。但 Win7 pro 英文版就报错。你的 win10 中安装报错吗?

@nobodxbodon
Copy link
Member Author

在新版 pip 中似乎已解决了(估计是在解决我这个 issue 时一道搞定的):
pip_install_grasspy_done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants