I'm trying to upgrade the builtin module pysqlite(sqlite3) on my windows 7, to the most recent version (currently 2.8.2).
My python version is 2.7.10.
When I run the pip commend on my cmd console, I get the following message:
C:\WINDOWS\system32>pip install --upgrade pysqlite Collecting pysqlite
Using cached pysqlite-2.8.2.tar.gz Installing collected packages:
pysqlite Running setup.py install for pysqlite ... error
Complete output from command "C:\Program Files\Anaconda\python.exe" -u -c "import setuptools,
tokenize;file='c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
c:\users\Bob\appdata\local\temp\pip-fkkno1-record\install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\pysqlite2
copying lib\dbapi2.py -> build\lib.win-amd64-2.7\pysqlite2
copying lib\dump.py -> build\lib.win-amd64-2.7\pysqlite2
copying lib__init__.py -> build\lib.win-amd64-2.7\pysqlite2
creating build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\dbapi.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\dump.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\factory.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\hooks.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\regression.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\transactions.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\types.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\userfunctions.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test__init__.py -> build\lib.win-amd64-2.7\pysqlite2\test
running build_ext
building 'pysqlite2._sqlite' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\src
C:\Users\Bob\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS-
/DNDEBUG -DMODULE_NAME=\"pysqlite2.dbapi2\" -I'{' -Iis -Inot
-Irecognized -Ias -Ian -Iinternal -Ior -Iexternal -Icommand, -Ioperable -Iprogram -Ior -Ibatch -Ifile. "-IC:\Program Files\Anaconda\include" "-IC:\Program Files\Anaconda\PC"
/Tcsrc/module.c /Fobuild\temp.win-amd64-2.7\Release\src/module.obj
module.c
c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\src\connection.h(33)
: fatal error C1083: Cannot open include file: 'sqlite3.h': No such
file or directory
error: command 'C:\Users\Bob\AppData\Local\Programs\Common\Microsoft\Visual
C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
---------------------------------------- Command ""C:\Program Files\Anaconda\python.exe" -u -c "import setuptools,
tokenize;file='c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
c:\users\Bob\appdata\local\temp\pip-fkkno1-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\
So I tried using easy install, and got the following message:
C:\WINDOWS\system32>easy_install -U pysqlite Searching for pysqlite
Reading https://pypi.python.org/simple/pysqlite/ Best match: pysqlite
2.8.2 Downloading https://pypi.python.org/packages/cc/a4/023ee9dba54b3cf0c5a4d0fb2f1ad80332ef23549dd4b551a9f2cbe88786/pysqlite-2.8.2.tar.gz#md5=b8488f6a353bd6a3cd85d327d326376a
Processing pysqlite-2.8.2.tar.gz Writing
c:\users\Bob\appdata\local\temp\easy_install-jwrns4\pysqlite-2.8.2\setup.cfg
Running pysqlite-2.8.2\setup.py -q bdist_egg --dist-dir
c:\users\Bob\appdata\local\temp\easy_install-jwrns4\pysqlite-2.8.2\egg-dist-tmp-dw1hgi
warning: no files found matching 'doc*.txt' module.c
c:\users\Bob\appdata\local\temp\easy_install-jwrns4\pysqlite-2.8.2\src\connection.h(33)
: fatal error C1083: Cannot open include file: 'sqlite3.h': No such
file or directory error: Setup script exited with error: command
'C:\Users\Bob\AppData\Local\Programs\Common\Microsoft\Visual
C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
Any ideas how this module can be updated?
Thanks in advance!
Related
I am trying to install mod_wsgi on windows 10 with python 3.7.3. When i run this command pip install mod_wsgi i am getting following error , i have also install Microsoft VC Build Tool 2019 v14.2
Using Windows 10 latest updates, pip latest version , setuptools latest verion . When mod_wsgi starts build then this error is occurring.
(venv) D:\myprojec>pip install mod_wsgi
Collecting mod_wsgi
Using cached mod_wsgi-4.7.1.tar.gz (498 kB)
Building wheels for collected packages: mod-wsgi
Building wheel for mod-wsgi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\dell\AppData\Local\Temp\pip-wheel-3cghvb62'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\
Complete output (33 lines):
c:\users\dell\appdata\local\programs\python\python37\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi
creating build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server
creating build\lib.win-amd64-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management
creating build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
creating build\lib.win-amd64-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\docs
creating build\lib.win-amd64-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win-amd64-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\xampp\apache\bin/include -ID:\venv\include -Ic:\users\dell\appdata\local\programs\python\python37\include -Ic:\users\dell\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\src\server\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for mod-wsgi
Running setup.py clean for mod-wsgi
Failed to build mod-wsgi
Installing collected packages: mod-wsgi
Running setup.py install for mod-wsgi ... error
ERROR: Command errored out with exit status 1:
command: 'D:\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\dell\AppData\Local\Temp\pip-record-73ujk23s\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\venv\include\site\python3.7\mod-wsgi'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\
Complete output (33 lines):
c:\users\dell\appdata\local\programs\python\python37\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi
creating build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server
creating build\lib.win-amd64-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management
creating build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
creating build\lib.win-amd64-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\docs
creating build\lib.win-amd64-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win-amd64-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\xampp\apache\bin/include -ID:\venv\include -Ic:\users\dell\appdata\local\programs\python\python37\include -Ic:\users\dell\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\src\server\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\dell\AppData\Local\Temp\pip-record-73ujk23s\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\venv\include\site\python3.7\mod-wsgi' Check the logs for full command output.
I was trying to install mod_wsgi , so i installed its prerequisites .
Python (3.7.4)
Microsoft Visual C++ Build tool (2015) Microsoft
Visual C++ 2015-2019 Redistributable (14.23.27820)
Xampp (for Apache 2.4)
But the on doing pip install mod_wsgi i got following errors
C:\Windows\system32>pip install mod_wsgi
Collecting mod_wsgi
Using cached https://files.pythonhosted.org/packages/26/03/a3ed5abc2e66c82c40b
0735c2f819c898d136879b00be4f5537126b6a4a4/mod_wsgi-4.6.7.tar.gz
Installing collected packages: mod-wsgi
Running setup.py install for mod-wsgi ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\taha.tauqir\appdata\local\programs\python\python37-32\py
thon.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\
\TAHA~1.TAU\\AppData\\Local\\Temp\\pip-install-_zkqbo33\\mod-wsgi\\setup.py'"'"'
; __file__='"'"'C:\\Users\\TAHA~1.TAU\\AppData\\Local\\Temp\\pip-install-_zkqbo3
3\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);c
ode=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code,
__file__, '"'"'exec'"'"'))' install --record 'C:\Users\TAHA~1.TAU\AppData\Local\
Temp\pip-record-4uoq0nq8\install-record.txt' --single-version-externally-managed
--compile
cwd: C:\Users\TAHA~1.TAU\AppData\Local\Temp\pip-install-_zkqbo33\mod-ws
gi\
Complete output (33 lines):
c:\users\taha.tauqir\appdata\local\programs\python\python37-32\lib\distutils
\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win32-3.7\mod_wsgi
creating build\lib.win32-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win32-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win32-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win32-3.7\mod_wsgi\server
creating build\lib.win32-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win32-3.7\mod_wsgi\se
rver\management
creating build\lib.win32-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win32-3.7\
mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win32-3.7\mo
d_wsgi\server\management\commands
creating build\lib.win32-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win32-3.7\mod_wsgi\docs
creating build\lib.win32-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win32-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win32-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\src
creating build\temp.win32-3.7\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -IC:\xampp\apache/include -Ic:\users\taha.tauqir\appda
ta\local\programs\python\python37-32\include -Ic:\users\taha.tauqir\appdata\loca
l\programs\python\python37-32\include /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win
32-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
c:\users\taha.tauqir\appdata\local\temp\pip-install-_zkqbo33\mod-wsgi\src\se
rver\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h
': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\b
in\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\taha.tauqir\appdata\loc
al\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokeni
ze; sys.argv[0] = '"'"'C:\\Users\\TAHA~1.TAU\\AppData\\Local\\Temp\\pip-install-
_zkqbo33\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\TAHA~1.TAU\\AppData\
\Local\\Temp\\pip-install-_zkqbo33\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'
"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C
:\Users\TAHA~1.TAU\AppData\Local\Temp\pip-record-4uoq0nq8\install-record.txt' --
single-version-externally-managed --compile Check the logs for full command outp
ut.
I have tried 2 commands:
pip install mysql-python
and
pip install mysqlclient
Error for the pip install mysql-python
Command "C:\Users\Pops\Desktop\Martin\Programming\Python\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Pops\\AppData\\Local\\Temp\\pip-install-zfndvw17\\mysql-python
\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Pops\AppData\Local\Temp\pip-reco
rd-jpu7d9zb\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Pops\Desktop\Martin\Programming\Python\venv\include\site\python3.7\mysql-python" failed with er
ror code 1 in C:\Users\Pops\AppData\Local\Temp\pip-install-zfndvw17\mysql-python\
Error for the pip install mysqlclient
Command "C:\Users\Pops\Desktop\Martin\Programming\Python\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Pops\\AppData\\Local\\Temp\\pip-install-cn_nm0np\\mysqlclient\
\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Pops\AppData\Local\Temp\pip-recor
d-lyzr49kh\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Pops\Desktop\Martin\Programming\Python\venv\include\site\python3.7\mysqlclient" failed with erro
r code 1 in C:\Users\Pops\AppData\Local\Temp\pip-install-cn_nm0np\mysqlclient\
This is the download portion and seems to work fine until the end. (Just putting this here to fill-up more non-code text for stackoverflow to accept the revision)
Top portion prior to error:
Collecting mysqlclient
Downloading https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz (90kB)
100% |████████████████████████████████| 92kB 168kB/s
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command C:\Users\Pops\Desktop\Martin\Programming\Python\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Pops\\AppData\\Local\\Temp\\pip-instal
l-cn_nm0np\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Pops\AppD
ata\Local\Temp\pip-record-lyzr49kh\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Pops\Desktop\Martin\Programming\Python\venv\include\site\python3.7\mysql
client:
C:\Users\Pops\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying _mysql_exceptions.py -> build\lib.win32-3.7
creating build\lib.win32-3.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
creating build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.7\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Dversion_info=(1,3,13,'final',0) -D__version__=1.3.13 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -IC:\Users\Pops\Desktop\Martin\Pro
gramming\Python\venv\include -IC:\Users\Pops\AppData\Local\Programs\Python\Python37-32\include -IC:\Users\Pops\AppData\Local\Programs\Python\Python37-32\include "-IC:\Program Files (x86)\Windows Kits
\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Win
dows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tc_mysql.c /Fobuild\temp.win32-3.7\Release\_mysql.obj /Zl
error: command 'cl.exe' failed: No such file or directory
----------------------------------------
You have to add cl.exe into your PATH. It is generally located in (visual studio folder)\VC\bin directory. Add that to your PATH variable using the steps in here.
After this restart the command prompt and you can use cl.exe from command prompt.
Alternatively you can download unofficial windows binaries for mysqlclient from https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient. And Install using pip install "path to the downloaded whl file"
As I mentioned in the comment, you need to cl.exe folder.
You can do it through Visual Studio installer.
Install the following C++ compilers:
I am trying to install mysql-python, I have tried two methods in pip
python -m pip install mysql-python
This does not work saying "Failed Building Wheel for MySQL-Python"
Downloading the wheels MySQL_python-1.2.5-cp27-none-win_amd64 and MySQL_python-1.2.5-cp27-none-win32 and trying to install each of them separately with the command
python -m pip install filename
This does not work in each case saying it is "not supported on this platform'
Does any one know what is wrong and how I can install mysql-python?
Update
Since writing this I am still having trouble getting MySQLdb working but have tried a few more things.
1) I am using Python 3.5 mysql-python is for Python 2.x, I should have been trying to install mysqlclient. However I am now having similar issues as above installing mysqlclient both with wheels and with just pip.
> pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\teddy\\appdata\\local\\temp\\pip-build-lhtha0\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\teddy\appdata\local\temp\pip-stnbio-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
copying _mysql_exceptions.py -> build\lib.win32-2.7
creating build\lib.win32-2.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-2.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-2.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-2.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-2.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-2.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-2.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-2.7\MySQLdb
creating build\lib.win32-2.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-2.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-2.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-2.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-2.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-2.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-2.7\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-2.7\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\Users\teddy\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,3,10,'final',0) -D__version__=1.3.10 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -Ic:\python27\include -Ic:\python27\PC /Tc_mysql.c /Fobuild\temp.win32-2.7\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(29) : fatal error C1083: Cannot open include file: 'my_config.h': No such file or directory
error: command 'C:\\Users\\teddy\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\teddy\\appdata\\local\\temp\\pip-build-lhtha0\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\teddy\appdata\local\temp\pip-stnbio-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\teddy\appdata\local\temp\pip-build-lhtha0\mysqlclient\
2) I have tried installing MySQL connector C. This hasn't changed anything.
3) I have tried getting it working on Spyder the IDE that comes with Anaconda
So can anyone suggest anything else
I finally did it. There were two things I changed to get it working:
My Pip was pointing to an older version of Python I had on my
computer and for some reason Idle was picking it up but not Spyder.
I had to move one of the mysql connector files from:
C:\Program Files\MySQL to C:\Program Files (x86)\MySQL
I am running python 2.7 with the VLC module on windows 7 to do this:
import vlc
i = vlc.Instance('--verbose 2'.split())
p = i.media_player_new()
p.set_mrl('rtp://#192.168.0.101:8080/video')
p.play()
However when I try to install VLC module with pip, it returns the following error:
C:\Windows\System32>pip install vlc
Collecting vlc
Using cached vlc-0.0.1.tar.gz
Collecting app (from vlc)
Using cached app-0.0.2.tar.gz
Collecting appscript (from app->vlc)
Using cached appscript-1.0.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): envoy in c:\python27\l
ib\site-packages\envoy-0.0.3-py2.7.egg (from app->vlc)
Requirement already satisfied (use --upgrade to upgrade): osascript in c:\python
27\lib\site-packages\osascript-0.0.4-py2.7.egg (from app->vlc)
Installing collected packages: appscript, app, vlc
Running setup.py install for appscript
building 'aem.ae' extension
C:\Users\adb\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9
.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:
\Python27\PC /Tcappscript_2x\ext/ae.c /Fobuild\temp.win32-2.7\Release\appscript_
2x\ext/ae.obj -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4
ae.c
c:\users\adb\appdata\local\temp\pip-build-qjopue\appscript\appscript_2x\ext\
aetoolbox.h(17) : fatal error C1083: Cannot open include file: 'Carbon/Carbon.h'
: No such file or directory
error: command 'C:\\Users\\adb\\AppData\\Local\\Programs\\Common\\Microsoft\
\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\adb\\appdata\\local\\temp\\pip-build-qjopue\\appscr
ipt\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().rep
lace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\adb\appdata\lo
cal\temp\pip-xw6gkp-record\install-record.txt --single-version-externally-manage
d --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
copying appscript_2x\lib\mactypes.py -> build\lib.win32-2.7
copying appscript_2x\lib\osax.py -> build\lib.win32-2.7
creating build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\aemcodecs.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\aemconnect.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\aemreference.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\aemsend.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\findapp.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\kae.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\mactypes.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\typewrappers.py -> build\lib.win32-2.7\aem
copying appscript_2x\lib\aem\__init__.py -> build\lib.win32-2.7\aem
creating build\lib.win32-2.7\appscript
copying appscript_2x\lib\appscript\defaultterminology.py -> build\lib.win32-
2.7\appscript
copying appscript_2x\lib\appscript\genericreference.py -> build\lib.win32-2.
7\appscript
copying appscript_2x\lib\appscript\keywordwrapper.py -> build\lib.win32-2.7\
appscript
copying appscript_2x\lib\appscript\reference.py -> build\lib.win32-2.7\appsc
ript
copying appscript_2x\lib\appscript\referencerenderer.py -> build\lib.win32-2
.7\appscript
copying appscript_2x\lib\appscript\reservedkeywords.py -> build\lib.win32-2.
7\appscript
copying appscript_2x\lib\appscript\terminology.py -> build\lib.win32-2.7\app
script
copying appscript_2x\lib\appscript\terminologyparser.py -> build\lib.win32-2
.7\appscript
copying appscript_2x\lib\appscript\__init__.py -> build\lib.win32-2.7\appscr
ipt
running build_ext
building 'aem.ae' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\appscript_2x
creating build\temp.win32-2.7\Release\appscript_2x\ext
C:\Users\adb\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9
.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:
\Python27\PC /Tcappscript_2x\ext/ae.c /Fobuild\temp.win32-2.7\Release\appscript_
2x\ext/ae.obj -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4
ae.c
c:\users\adb\appdata\local\temp\pip-build-qjopue\appscript\appscript_2x\ext\
aetoolbox.h(17) : fatal error C1083: Cannot open include file: 'Carbon/Carbon.h'
: No such file or directory
error: command 'C:\\Users\\adb\\AppData\\Local\\Programs\\Common\\Microsoft\
\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:
\\users\\adb\\appdata\\local\\temp\\pip-build-qjopue\\appscript\\setup.py';exec(
compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
__file__, 'exec'))" install --record c:\users\adb\appdata\local\temp\pip-xw6gkp-
record\install-record.txt --single-version-externally-managed --compile" failed
with error code 1 in c:\users\adb\appdata\local\temp\pip-build-qjopue\appscript
C:\Windows\System32>
I then tried to install appscript separately, but it still returned an error.
After some searching, I found out that appscript module is for Mac only. But I would like to use the VLC module on Windows.
Any suggestions would be much appreciated.