添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
月球上的啄木鸟  ·  Linux下安装Anaconda ...·  4 天前    · 
眉毛粗的豆浆  ·  Amazon Linux 2023: ...·  3 天前    · 
安静的梨子  ·  A Minimum Complete ...·  2 天前    · 
路过的帽子  ·  How to set up a ...·  2 天前    · 
不拘小节的杯子  ·  How to Use JavaScript ...·  10 月前    · 
酒量大的仙人掌  ·  Bindable properties - ...·  1 年前    · 

Amazon Linux 2023: Installing mysqlclient for Python 3.11

0

Hello I have upgraded my python from the default 3.9 to 3.11 using

sudo dnf install python3.11 -y

I am unable to install mysqlclient using pip3.11 as it gives me the following error

building 'MySQLdb._mysql' extension creating build/temp.linux-x86_64-cpython-311 creating build/temp.linux-x86_64-cpython-311/src creating build/temp.linux-x86_64-cpython-311/src/MySQLdb gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -ftree-vectorize -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -ftree-vectorize -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -ftree-vectorize -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC "-Dversion_info=(2, 2, 1, 'final', 0)" -D__version__=2.2.1 -I/usr/include/python3.11 -c src/MySQLdb/_mysql.c -o build/temp.linux-x86_64-cpython-311/src/MySQLdb/_mysql.o -I/usr/include/mysql -std=c99 src/MySQLdb/_mysql.c:47:10: fatal error: Python.h: No such file or directory 47 | #include "Python.h" | ^~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mysqlclient