无法在Windows Server 2016上安装pysqlite(WinPython)

时间:2017-03-16 12:19:08

标签: python windows sqlite

我已经为Python 9.0安装了Microsoft Visual C ++。

perl openurls.pl < myurls.txt

给我错误:

pip install pysqlite

在Google上搜索有人建议使用http://www.lfd.uci.edu/~gohlke/pythonlibs/#pysqlite中的二进制文件。我已经下载了pysqlite-2.8.3-cp27-cp27m-win_amd64.whl。

C:\Users\Administrator\Desktop\blog>pip install pysqlite Collecting pysqlite   Using cached pysqlite-2.8.3.tar.gz Building wheels for collected packages: pysqlite   Running setup.py bdist_wheel for pysqlite   Complete output from command C:\Users\Administrator\Desktop\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\python.exe
-c "import setuptools;__file__='c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-build-pcaf0x\\pysqlite\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\admini~1\appdata\local\temp\2\tmphdeogzpip-wheel-:   running bdist_wheel   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\Administrator\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:\Users\Administrator\Desktop\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\include
-IC:\Users\Administrator\Desktop\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\PC /Tcsrc/module.c /Fobuild\temp.win-amd64-2.7\Release\src/module.obj   module.c   c:\users\administrator\appdata\local\temp\2\pip-build-pcaf0x\pysqlite\src\connection.h(33) : fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory   error: command 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

  ----------------------------------------   Failed building wheel for pysqlite Failed to build pysqlite Installing collected packages: pysqlite   Running setup.py install for pysqlite
    Complete output from command C:\Users\Administrator\Desktop\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\python.exe
-c "import setuptools, tokenize;__file__='c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-build-pcaf0x\\pysqlite\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admini~1\appdata\local\temp\2\pip-b71yte-record\install-record.txt
--single-version-externally-managed --compile:
    running install
    running build
    running build_py
    running build_ext
    building 'pysqlite2._sqlite' extension
    C:\Users\Administrator\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:\Users\Administrator\Desktop\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\include
-IC:\Users\Administrator\Desktop\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\PC /Tcsrc/module.c /Fobuild\temp.win-amd64-2.7\Release\src/module.obj
    module.c
    c:\users\administrator\appdata\local\temp\2\pip-build-pcaf0x\pysqlite\src\connection.h(33) : fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory
    error: command 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

    ---------------------------------------- Command "C:\Users\Administrator\Desktop\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\python.exe
-c "import setuptools, tokenize;__file__='c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-build-pcaf0x\\pysqlite\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admini~1\appdata\local\temp\2\pip-b71yte-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\admini~1\appdata\local\temp\2\pip-build-pcaf0x\pysqlite You are using pip version 7.1.2, however version 9.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

与32位版本相同,尽管系统是64位

1 个答案:

答案 0 :(得分:1)

最新消息告诉您必须升级pip包,以便pip将识别“pysqlite-2.8.3-cp27-cp27m-win_amd64.whl”中使用的最近轮格式