当前位置: 首页 > wzjs >正文

刘涛做的婴儿玩具网站线上推广平台有哪些

刘涛做的婴儿玩具网站,线上推广平台有哪些,鸡泽网站建设案例,wordpress在首页音乐最近学习python3,在安装mysqlclient的时候遇到了一些问题,直接使用哦pip install mysqlclient 直接报错了,记录一下解决方案。 环境信息 设备:Macbook Pro m1 系统:macos Sequoia 15.3.2 最终成功的python版本&#xf…

最近学习python3,在安装mysqlclient的时候遇到了一些问题,直接使用哦pip install mysqlclient 直接报错了,记录一下解决方案。

环境信息
设备:Macbook Pro m1
系统:macos Sequoia 15.3.2
最终成功的python版本:Python3.13.3
pip版本:25.0.1
最终系统环境下mysqlclient版本:2.2.7 -> 对应mysql-client: 8.0.42

直接执行命令安装: pip3 install mysqlclient,报错信息:

Collecting mysqlclientUsing cached mysqlclient-2.2.7.tar.gz (91 kB)Installing build dependencies ... doneGetting requirements to build wheel ... errorerror: subprocess-exited-with-error× Getting requirements to build wheel did not run successfully.│ exit code: 1╰─> [35 lines of output]/bin/sh: pkg-config: command not found/bin/sh: pkg-config: command not found/bin/sh: pkg-config: command not found/bin/sh: pkg-config: command not foundTrying pkg-config --exists mysqlclientCommand 'pkg-config --exists mysqlclient' returned non-zero exit status 127.Trying pkg-config --exists mariadbCommand 'pkg-config --exists mariadb' returned non-zero exit status 127.Trying pkg-config --exists libmariadbCommand 'pkg-config --exists libmariadb' returned non-zero exit status 127.Trying pkg-config --exists perconaserverclientCommand 'pkg-config --exists perconaserverclient' returned non-zero exit status 127.Traceback (most recent call last):File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>main()~~~~^^File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in mainjson_out["return_val"] = hook(**hook_input["kwargs"])~~~~^^^^^^^^^^^^^^^^^^^^^^^^File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheelreturn hook(config_settings)File "/private/var/folders/pg/lcz_0brx7dl64hcxtkjtrn1c0000gp/T/pip-build-env-lqq7jo65/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheelreturn self._get_build_requires(config_settings, requirements=[])~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/private/var/folders/pg/lcz_0brx7dl64hcxtkjtrn1c0000gp/T/pip-build-env-lqq7jo65/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requiresself.run_setup()~~~~~~~~~~~~~~^^File "/private/var/folders/pg/lcz_0brx7dl64hcxtkjtrn1c0000gp/T/pip-build-env-lqq7jo65/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setupexec(code, locals())~~~~^^^^^^^^^^^^^^^^File "<string>", line 156, in <module>File "<string>", line 49, in get_config_posixFile "<string>", line 28, in find_package_nameException: Can not find valid pkg-config name.Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.

看错误信息是少了pkg-config
执行命令:brew install pkg-config,也报错!!!

fatal: not in a git directory
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-services, skipping update!
Running `brew update --auto-update`...
Warning: You are using macOS 15.
We do not provide support for this pre-release version.
It is expected behaviour that some formulae will fail to build in this pre-release version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.==> Fetching pkg-config
==> Downloading https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar
######################################################################## 100.0%
==> ./configure --prefix=/opt/homebrew/Cellar/pkg-config/0.29.2_3 --disable-host
==> make
Last 15 lines from /Users/nankexiansheng/Library/Logs/Homebrew/pkg-config/02.make:
gatomic.c:464:10: error: incompatible integer to pointer conversion passing 'gsize' (aka 'unsigned long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]464 |   return g_atomic_pointer_xor ((volatile gpointer *) atomic, val);|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gatomic.h:191:45: note: expanded from macro 'g_atomic_pointer_xor'191 |     (gsize) __sync_fetch_and_xor ((atomic), (val));                          \|                                             ^~~~~
4 errors generated.
make[6]: *** [libglib_2_0_la-gatomic.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2Do not report this issue to Homebrew/brew or Homebrew/core!Error: You are using macOS 15.
We do not provide support for this pre-release version.
It is expected behaviour that some formulae will fail to build in this pre-release version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

解决方法:
mysqlclient安装
可以参考mysqlclient文档
首选确保你的macos已经安装配置好了brew,以及配置了国内源。

# 安装pkg-config
brew install pkg-config
注意:如果这里报错,先执行下brew install mysql;再执行brew install pkg-config命令
# 安装 mysql-client
brew install mysql-client@8.0
# 添加环境变量 在 ~/.zshrc 中添加下面这行
export PKG_CONFIG_PATH="$(brew --prefix)/opt/mysql-client@8.0/lib/pkgconfig"保存后 source ~/.zshrc 刷新环境变量通过 printenv 可以查看确认当前环境变量

接下来可以正常安装mysqlclient,这里我安装的是mysqlclient 2.2.7版本

注意⚠️:2.0.0 以上版本需要python3.8及以上才能兼容

pip3 install mysqlclient

如果正常安装完成,没有报错,进入当前python运行环境测试
在这里插入图片描述
如果能正常引入MySQLdb而没有报错,那么基本上算上顺利完成了。可以尝试在虚拟环境安装完依赖启动项目试试

http://www.dtcms.com/wzjs/25049.html

相关文章:

  • 企业常用系统各系统介绍快速优化网站排名软件
  • APP网站怎么做小广告设计
  • behance中文网站seo如何优化关键词
  • 南县做网站推荐东莞今日头条最新消息
  • 建站工具 wordpress搜索引擎优化需要多少钱
  • 装修素材的网站大全优化排名推广教程网站
  • 怎样做网站的链接谷歌自然排名优化
  • html水平导航栏怎么做优化方案电子版
  • 上海学网站建设百度搜索风云榜
  • 深圳网站开发设计小红书关键词检测
  • web网站开发源代码广东网站营销seo费用
  • 全球网站流量排名查询短视频培训机构
  • wordpress获取指定图片seo入门培训教程
  • 怎么对网站做压力测试快速关键词排名首页
  • 郑州网站建设贝斯特微信上如何投放广告
  • 门户网站改版方案附子seo
  • 微商引流客源最快的方法优化网站打开速度
  • 微网站不能分享朋友圈石家庄网络营销
  • 手机wap版网站制作免费seo网站诊断免费
  • 开发一个网站多少钱seo网站诊断流程
  • 网页设计是什么岗位seo黑帽教学网
  • 做淘客网站需要备案百度推广按效果付费是多少钱
  • 自己做的电影网站犯法吗指数工具
  • winserverfrp可以做网站吗小说推广平台有哪些
  • 班级网站界面河南企业网站推广
  • 付费推广平台有哪些seo计费怎么刷关键词的
  • 网站建设和web前端区别百度seo关键词优化推荐
  • 可以做外贸的网站bt蚂蚁磁力
  • 济南市个人网站制作网络顾问
  • 有没有建网站的app如何做好网络销售技巧