Running setup py install for mysqlclient error

Hello , I'm trying to install mysqlclient with this command pip install mysqlclient but i'm having this errors mysql : 8.0.2 python : 3.8 thanks for help ERROR: Command errored out with exi...

Hello ,

I’m trying to install mysqlclient with this command pip install mysqlclient
but i’m having this errors
mysql : 8.0.2
python : 3.8

thanks for help
ERROR: Command errored out with exit status 1:
command: /home/salim/anaconda3/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/setup.py'»‘»‘;f=getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ bdist_wheel -d /tmp/pip-wheel-bknaelje
cwd: /tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/
Complete output (41 lines):
mysql_config —version
[‘8.0.23’]
mysql_config —libs
[‘-L/usr/lib/x86_64-linux-gnu’, ‘-lmysqlclient’, ‘-lpthread’, ‘-lz’, ‘-lm’, ‘-lrt’, ‘-lssl’, ‘-lcrypto’, ‘-ldl’, ‘-lresolv’]
mysql_config —cflags
[‘-I/usr/include/mysql’]
ext_options:
library_dirs: [‘/usr/lib/x86_64-linux-gnu’]
libraries: [‘mysqlclient’, ‘pthread’, ‘m’, ‘rt’, ‘dl’, ‘resolv’]
extra_compile_args: [‘-std=c99’]
extra_link_args: []
include_dirs: [‘/usr/include/mysql’]
extra_objects: []
define_macros: [(‘version_info’, «(2,0,3,’final’,0)»), (‘version‘, ‘2.0.3’)]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/init.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/exceptions.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.8/MySQLdb
creating build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
running build_ext
building ‘MySQLdb.mysql’ extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/MySQLdb
gcc -pthread -B /home/salim/anaconda3/compiler_compat -Wl,—sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(2,0,3,’final’,0) -D__version
=2.0.3 -I/usr/include/mysql -I/home/salim/anaconda3/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.8/MySQLdb/_mysql.o -std=c99
unable to execute ‘gcc’: No such file or directory
error: command ‘gcc’ failed with exit status 1

ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient … error
ERROR: Command errored out with exit status 1:
command: /home/salim/anaconda3/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/setup.py'»‘»‘;f=getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-4z00fvw7/install-record.txt —single-version-externally-managed —compile —install-headers /home/salim/anaconda3/include/python3.8/mysqlclient
cwd: /tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/
Complete output (41 lines):
mysql_config —version
[‘8.0.23’]
mysql_config —libs
[‘-L/usr/lib/x86_64-linux-gnu’, ‘-lmysqlclient’, ‘-lpthread’, ‘-lz’, ‘-lm’, ‘-lrt’, ‘-lssl’, ‘-lcrypto’, ‘-ldl’, ‘-lresolv’]
mysql_config —cflags
[‘-I/usr/include/mysql’]
ext_options:
library_dirs: [‘/usr/lib/x86_64-linux-gnu’]
libraries: [‘mysqlclient’, ‘pthread’, ‘m’, ‘rt’, ‘dl’, ‘resolv’]
extra_compile_args: [‘-std=c99’]
extra_link_args: []
include_dirs: [‘/usr/include/mysql’]
extra_objects: []
define_macros: [(‘version_info’, «(2,0,3,’final’,0)»), (‘version‘, ‘2.0.3’)]
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/init.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/exceptions.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.8/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.8/MySQLdb
creating build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
running build_ext
building ‘MySQLdb.mysql’ extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/MySQLdb
gcc -pthread -B /home/salim/anaconda3/compiler_compat -Wl,—sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(2,0,3,’final’,0) -D__version
=2.0.3 -I/usr/include/mysql -I/home/salim/anaconda3/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.8/MySQLdb/_mysql.o -std=c99
unable to execute ‘gcc’: No such file or directory
error: command ‘gcc’ failed with exit status 1
—————————————-
ERROR: Command errored out with exit status 1: /home/salim/anaconda3/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-c4hl_5o6/mysqlclient_207b56e8542d4d91bf3ac25fbf30cae2/setup.py'»‘»‘;f=getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-4z00fvw7/install-record.txt —single-version-externally-managed —compile —install-headers /home/salim/anaconda3/include/python3.8/mysqlclient Check the logs for full command output.

  • #1

I’m trying to set up a Python application using the cPanel interface. I’ve successfully created it and added the requirements.txt file.

But when I click the «Run Pip Install» button, and select «requirements.txt», after it spins for a while I get this error message:

error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mysqlclient
error: subprocess-exited-with-error

× Running setup.py install for mysqlclient did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mysqlclientnote: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

The requirements.txt file lists

and my Python app is set to use python 3.8.6.

How can I complete the installation?

cPRex


  • #2

Hey there! cPanel doesn’t officially provide support for Python tools as outlined in our notice at the tope of this documentation page:

but have you tried making sure the mysql-community-devel or mysql-devel package is installed? If that is missing, Pip may not be able to build the mysqlclient properly.

This seems to be a relatively recent error as most information I found about this issue was created within the last 6 months. Here is one example:

  • #3

Thanks. In the end I changed from using mysqlclient to mysql-connector-python which installed OK.

A shame the former didn’t work. If I wanted to try again, how would I install the mysql-community-devel or mysql-devel packages on cPanel?

  • #4

Thanks. In the end I changed from using mysqlclient to mysql-connector-python which installed OK.

A shame the former didn’t work. If I wanted to try again, how would I install the mysql-community-devel or mysql-devel packages on cPanel?

Depends on OS but yum should work for AlmaLinux as well or you can use
dnf install [pkg-name]
yum install [pkg-name]

yum install mysql-devel
yum install mysql-community-devel

or

dnf install mysql-devel
dnf install mysql-community-devel

[[email protected] ~]# yum install mysql-community-devel
Last metadata expiration check: 1:53:02 ago on Wed 11 May 2022 11:43:10 PM CDT.
Package mysql-community-devel-8.0.29-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[[email protected] ~]# ]yum install mysql-devel
bash: ]yum: command not found
[[email protected] ~]# yum install mysql-devel
Last metadata expiration check: 1:54:11 ago on Wed 11 May 2022 11:43:10 PM CDT.
Package mysql-community-devel-8.0.29-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[[email protected] ~]

  • #5

Thank you! I’m a bit wary of installing extra stuff like this, given I’m setting this site up on someone else’s server for them. But it’s useful to know what to do if mysql-connector-python doesn’t work out (or for anyone else finding this page and wondering what to do!).

cPRex


  • #6

I’m glad to hear that worked well!

50 / 14 / 3

Регистрация: 15.02.2019

Сообщений: 514

1

01.04.2021, 22:02. Показов 2298. Ответов 11


Здравствуйте, не получается установить библиотеку «mysqlclient», помогите пожалуйста.

Код

E:Study_FilesCDPPTDoSP>pip install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-2.0.3.tar.gz (88 kB)
Building wheels for collected packages: mysqlclient
  Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:pythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pip-install-uzkfia2j\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\Admin\AppData\Local\Te
mp\pip-install-uzkfia2j\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:Us
ersAdminAppDataLocalTemppip-wheel-t417ex07'
       cwd: C:UsersAdminAppDataLocalTemppip-install-uzkfia2jmysqlclient
  Complete output (23 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating buildlib.win32-3.8
  creating buildlib.win32-3.8MySQLdb
  copying MySQLdb__init__.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdb_exceptions.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbconnections.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbconverters.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbcursors.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbrelease.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbtimes.py -> buildlib.win32-3.8MySQLdb
  creating buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstants__init__.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsCR.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsER.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.8MySQLdbconstants
  running build_ext
  building 'MySQLdb._mysql' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
  ----------------------------------------
  ERROR: Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:pythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pip-install-uzkfia2j\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\Admin\AppData\Local\
Temp\pip-install-uzkfia2j\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C
:UsersAdminAppDataLocalTemppip-record-sik_6mwainstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:pythonIncludemysqlclient'
         cwd: C:UsersAdminAppDataLocalTemppip-install-uzkfia2jmysqlclient
    Complete output (23 lines):
    running install
    running build
    running build_py
    creating build
    creating buildlib.win32-3.8
    creating buildlib.win32-3.8MySQLdb
    copying MySQLdb__init__.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdb_exceptions.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbconnections.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbconverters.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbcursors.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbrelease.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbtimes.py -> buildlib.win32-3.8MySQLdb
    creating buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstants__init__.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsCR.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsER.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.8MySQLdbconstants
    running build_ext
    building 'MySQLdb._mysql' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:pythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pip-install-uzkfia2j\mysqlclient\setup.py'"'"'; __file__='"'"'C
:\Users\Admin\AppData\Local\Temp\pip-install-uzkfia2j\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"
'exec'"'"'))' install --record 'C:UsersAdminAppDataLocalTemppip-record-sik_6mwainstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:pythonIncludemysqlclient' Check the logs for full command o
utput.
WARNING: You are using pip version 20.1.1; however, version 21.0.1 is available.
You should consider upgrading via the 'c:pythonpython.exe -m pip install --upgrade pip' command.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Модератор

Эксперт Python

2337 / 1401 / 476

Регистрация: 21.02.2017

Сообщений: 3,849

Записей в блоге: 1

02.04.2021, 07:18

2



1



50 / 14 / 3

Регистрация: 15.02.2019

Сообщений: 514

02.04.2021, 17:28

 [ТС]

3

Цитата
Сообщение от DmFat
Посмотреть сообщение

Написано же:

Установил, что дальше?

Код

E:Study_FilesCDPPTDoSP>pip install mysqlclient==2.0.3
Collecting mysqlclient==2.0.3
  Using cached mysqlclient-2.0.3.tar.gz (88 kB)
Building wheels for collected packages: mysqlclient
  Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:pythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pip-install-a26t4upt\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\Admin\AppData\Local\Te
mp\pip-install-a26t4upt\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:Us
ersAdminAppDataLocalTemppip-wheel-8bvaji1t'
       cwd: C:UsersAdminAppDataLocalTemppip-install-a26t4uptmysqlclient
  Complete output (29 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating buildlib.win32-3.8
  creating buildlib.win32-3.8MySQLdb
  copying MySQLdb__init__.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdb_exceptions.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbconnections.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbconverters.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbcursors.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbrelease.py -> buildlib.win32-3.8MySQLdb
  copying MySQLdbtimes.py -> buildlib.win32-3.8MySQLdb
  creating buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstants__init__.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsCR.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsER.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.8MySQLdbconstants
  copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.8MySQLdbconstants
  running build_ext
  building 'MySQLdb._mysql' extension
  creating buildtemp.win32-3.8
  creating buildtemp.win32-3.8Release
  creating buildtemp.win32-3.8ReleaseMySQLdb
  E:ProgramsVisual StudioProgramVCToolsMSVC14.28.29910binHostX86x86cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 "-IC:Program Files (x86)MySQLMySQL Connector C 6.1include
mariadb" -Ic:pythoninclude -Ic:pythoninclude "-IE:ProgramsVisual StudioProgramVCToolsMSVC14.28.29910include" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0ucrt" "-IC:Program Files (x86)Windows Kits10in
clude10.0.19041.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0um" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0cppwinrt
" /TcMySQLdb/_mysql.c /Fobuildtemp.win32-3.8ReleaseMySQLdb/_mysql.obj
  _mysql.c
  MySQLdb/_mysql.c(29): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: mysql.h: No such file or directory,
  error: command 'E:\Programs\Visual Studio\Program\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:pythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pip-install-a26t4upt\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\Admin\AppData\Local\
Temp\pip-install-a26t4upt\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C
:UsersAdminAppDataLocalTemppip-record-313f2fbzinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:pythonIncludemysqlclient'
         cwd: C:UsersAdminAppDataLocalTemppip-install-a26t4uptmysqlclient
    Complete output (29 lines):
    running install
    running build
    running build_py
    creating build
    creating buildlib.win32-3.8
    creating buildlib.win32-3.8MySQLdb
    copying MySQLdb__init__.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdb_exceptions.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbconnections.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbconverters.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbcursors.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbrelease.py -> buildlib.win32-3.8MySQLdb
    copying MySQLdbtimes.py -> buildlib.win32-3.8MySQLdb
    creating buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstants__init__.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsCR.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsER.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.8MySQLdbconstants
    copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.8MySQLdbconstants
    running build_ext
    building 'MySQLdb._mysql' extension
    creating buildtemp.win32-3.8
    creating buildtemp.win32-3.8Release
    creating buildtemp.win32-3.8ReleaseMySQLdb
    E:ProgramsVisual StudioProgramVCToolsMSVC14.28.29910binHostX86x86cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 "-IC:Program Files (x86)MySQLMySQL Connector C 6.1inclu
demariadb" -Ic:pythoninclude -Ic:pythoninclude "-IE:ProgramsVisual StudioProgramVCToolsMSVC14.28.29910include" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0ucrt" "-IC:Program Files (x86)Windows Kits10
include10.0.19041.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0um" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0cppwin
rt" /TcMySQLdb/_mysql.c /Fobuildtemp.win32-3.8ReleaseMySQLdb/_mysql.obj
    _mysql.c
    MySQLdb/_mysql.c(29): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: mysql.h: No such file or directory,
    error: command 'E:\Programs\Visual Studio\Program\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:pythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pip-install-a26t4upt\mysqlclient\setup.py'"'"'; __file__='"'"'C
:\Users\Admin\AppData\Local\Temp\pip-install-a26t4upt\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"
'exec'"'"'))' install --record 'C:UsersAdminAppDataLocalTemppip-record-313f2fbzinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:pythonIncludemysqlclient' Check the logs for full command o
utput.



0



Автоматизируй это!

Эксперт Python

6481 / 4174 / 1140

Регистрация: 30.03.2015

Сообщений: 12,325

Записей в блоге: 29

02.04.2021, 17:47

4

AlexKOR5, выше уже указали то, что ты не прочел. А у меня вопрос — почему именно эта бибилиотека,а не то, что рекомендует сам MySQL?



1



50 / 14 / 3

Регистрация: 15.02.2019

Сообщений: 514

02.04.2021, 19:03

 [ТС]

5

Цитата
Сообщение от Welemir1
Посмотреть сообщение

AlexKOR5, выше уже указали то, что ты не прочел. А у меня вопрос — почему именно эта бибилиотека,а не то, что рекомендует сам MySQL?

Я же говорю что установил Microsoft Visual C++ 14.0, но ошибка по-прежнему есть.



0



50 / 14 / 3

Регистрация: 15.02.2019

Сообщений: 514

02.04.2021, 19:31

 [ТС]

6

Цитата
Сообщение от Welemir1
Посмотреть сообщение

AlexKOR5, выше уже указали то, что ты не прочел. А у меня вопрос — почему именно эта бибилиотека,а не то, что рекомендует сам MySQL?

Вот почему

Миниатюры

Не получается установить библиотеку "mysqlclient"
 



0



Эксперт Python

5403 / 3827 / 1214

Регистрация: 28.10.2013

Сообщений: 9,554

Записей в блоге: 1

03.04.2021, 19:57

7

Скачай отсюда и установи уже скомпилированную библиотеку для своего 32-битного Python (кстати, почему у тебя все еще 32-бит?)

Добавлено через 59 секунд
P.S. pip install загруженный_файл.whl



1



50 / 14 / 3

Регистрация: 15.02.2019

Сообщений: 514

04.04.2021, 11:55

 [ТС]

8

Цитата
Сообщение от Garry Galler
Посмотреть сообщение

Скачай отсюда и установи уже скомпилированную библиотеку для своего 32-битного Python (кстати, почему у тебя все еще 32-бит?)

Добавлено через 59 секунд
P.S. pip install загруженный_файл.whl

Какие 32 бит?
У меня 64 бит.



0



Эксперт Python

5403 / 3827 / 1214

Регистрация: 28.10.2013

Сообщений: 9,554

Записей в блоге: 1

04.04.2021, 14:06

9

Цитата
Сообщение от AlexKOR5
Посмотреть сообщение

.win32-3.8

….

Если бы у тебя был 64-битный Python, то библиотека установилась бы без проблем, так как для x64 все уже скомпилировано.



1



50 / 14 / 3

Регистрация: 15.02.2019

Сообщений: 514

05.04.2021, 10:30

 [ТС]

10

Цитата
Сообщение от Garry Galler
Посмотреть сообщение

….

Если бы у тебя был 64-битный Python, то библиотека установилась бы без проблем, так как для x64 все уже скомпилировано.

Тода подскажите где скачать 64-битный Python?
Качал Python с официального сайта и почему-то скачал 32-битный, хотя выбирал 64.



0



Fudthhh

05.04.2021, 10:33

Не по теме:

Цитата
Сообщение от Garry Galler
Посмотреть сообщение

кстати, почему у тебя все еще 32-бит

Так проще, вдруг какой то дед на xp(x32) захочет запустить скрипт.



0



Эксперт Python

5403 / 3827 / 1214

Регистрация: 28.10.2013

Сообщений: 9,554

Записей в блоге: 1

05.04.2021, 19:18

12

Цитата
Сообщение от AlexKOR5
Посмотреть сообщение

Качал Python с официального сайта и почему-то скачал 32-битный, хотя выбирал 64.

https://www.python.org/ftp/pyt… thon-3.8.9-amd64.exe
https://www.python.org/ftp/pyt… thon-3.9.4-amd64.exe
и т.д.



1



IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

05.04.2021, 19:18

Помогаю со студенческими работами здесь

Как из исходников собирать библиотеку для python mysqlclient
Здравствуйте, подскажите пожалуйста как из исходников собирать библиотеку mysql. При обычной…

Создать родительский класс «Склад» и 3 подкласса («принтеры»,» сканеры», «ксероксы»)
Начните работу над проектом «Склад оргтехники». Создайте класс, описывающий склад. А также класс…

Дан список станций желтой ветки московского метро: line = [«Третьяковская», «Марксистская», «Площадь Ильича», «Авиамотор
Дан список станций желтой ветки московского метро:
line =
Считайте, что движение происходит от…

Написать программу проверки правильности написания сочетаний «жи», «ши», «ча», «ща»
Помогите пожалуйста написать программу проверки правильности написания сочетаний "жи", "ши", "ча",…

Игра «Угадай число — Экстрасенс» Не получается реализовать новую игру с генерацией нового числа
Игра "Угадай число — Экстрасенс" Не получается реализовать новую игру с генерацией нового числа по…

Захотел я установить библиотеку, а получил не библиотеку — под катом
Захотел я установить библиотеку premailer, как обычно через pip устанавливаю, окно консоли…

Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:

12

I keep getting this error when I pip3 install mysqlclient:

Collecting mysqlclient

Using cached https://files.pythonhosted.org/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz

Installing collected packages: mysqlclient

Running setup.py install for mysqlclient ... error

Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/hl/686_b9ds5nq38v7y3k4cwmfh0000gn/T/pip-install-6b1anf5g/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/hl/686_b9ds5nq38v7y3k4cwmfh0000gn/T/pip-record-1bme_7sw/install-record.txt --single-version-externally-managed --compile:

running install

running build

running build_py

creating build

creating build/lib.macosx-10.6-intel-3.6

copying _mysql_exceptions.py -> build/lib.macosx-10.6-intel-3.6

creating build/lib.macosx-10.6-intel-3.6/MySQLdb

copying MySQLdb/__init__.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb

copying MySQLdb/compat.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb

copying MySQLdb/connections.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb

copying MySQLdb/converters.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb

copying MySQLdb/cursors.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb

copying MySQLdb/release.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb

copying MySQLdb/times.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb

creating build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

copying MySQLdb/constants/CR.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

copying MySQLdb/constants/ER.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.6-intel-3.6/MySQLdb/constants

running build_ext

building '_mysql' extension

creating build/temp.macosx-10.6-intel-3.6

gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Dversion_info=(1,3,12,'final',0) -D__version__=1.3.12 -I/usr/local/Cellar/mysql/8.0.11/include/mysql -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c _mysql.c -o build/temp.macosx-10.6-intel-3.6/_mysql.o

_mysql.c:1894:3: error: use of undeclared identifier 'my_bool'

my_bool recon = reconnect;

^

_mysql.c:1895:58: error: use of undeclared identifier 'recon'

mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);

^

2 errors generated.

error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/hl/686_b9ds5nq38v7y3k4cwmfh0000gn/T/pip-install-6b1anf5g/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/hl/686_b9ds5nq38v7y3k4cwmfh0000gn/T/pip-record-1bme_7sw/install-record.txt --single-version-externally-managed --compile" failed with errorcode 1 in /private/var/folders/hl/686_b9ds5nq38v7y3k4cwmfh0000gn/T/pip-install-6b1anf5g/mysqlclient/

Понравилась статья? Поделить с друзьями:
  • Run time error 19 file or function is not found pawn
  • Running setup py install for fastecdsa error
  • Run time error 17 invalid unsupported p code file format
  • Running setup py install for dlib error
  • Run time error 13 vba excel type mismatch