python3 pip install mysqlclient报错

发布于 2022-09-06 06:05:11 字数 1738 浏览 19 评论 0

报错显示如下,不清楚是哪里的编码问题,环境是win10+python3.7

PS C:\Users\zhu\python\mysite> pip3 install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-1.3.12.tar.gz
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... error
Exception:
Traceback (most recent call last):
  File "c:\users\zhu\appdata\local\programs\python\python37\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
    return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 33: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\zhu\appdata\local\programs\python\python37\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\zhu\appdata\local\programs\python\python37\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\zhu\appdata\local\programs\python\python37\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\zhu\appdata\local\programs\python\python37\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\users\zhu\appdata\local\programs\python\python37\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\users\zhu\appdata\local\programs\python\python37\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
    return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 33: invalid continuation byte

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

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

发布评论

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

评论(3

飘逸的'云 2022-09-13 06:05:11

试试pip install mysqlclient-1.3.7-cp35-cp35m-win_amd64.whl

情栀口红 2022-09-13 06:05:11

update一下pip应该就好了。解释在这:https://stackoverflow.com/que...

拧巴小姐 2022-09-13 06:05:11

yum install gcc python-devel mysql-devel -y

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