在设计器安装 pymssql 报错,错误如下,请问如何处理?
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting pymssql
Downloading http://mirrors.aliyun.com/pypi/packages/4b/5f/e1707ea81e8ed367ecb919026370353564ce086b6b74fa51823c666acf09/pymssql-2.2.4.tar.gz (169kB)
Installing build dependencies: started
Installing build dependencies: finished with status ‘done’
micropython-markupbase 3.3.3.post1 requires micropython-re-pcre, which is not installed.
Installing collected packages: pymssql
Running setup.py install for pymssql: started
Running setup.py install for pymssql: finished with status ‘error’
Complete output from command “D:\Program Files\ISRPA\Python\pythons.exe” -u -c “import setuptools, tokenize;file=‘C:\Users\admin\AppData\Local\Temp\pip-install-dzee32bd\pymssql\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\admin\AppData\Local\Temp\pip-record-2374eg0_\install-record.txt –single-version-externally-managed –compile:
setup.py: platform.system() => Windows
setup.py: platform.architecture()=> (‘32bit’, ‘WindowsPE’)
setup.py: include_dirs => []
setup.py: library_dirs => []
running install
C:\Users\admin\AppData\Local\Temp\pip-build-env-0alb7b16\Lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pymssql
copying src\pymssql_init_.py -> build\lib.win32-3.6\pymssql
running build_ext
cythoning src\pymssql_mssql.pyx to src\pymssql_mssql.c
cythoning src\pymssql_pymssql.pyx to src\pymssql_pymssql.c
building ‘pymssql._mssql’ extension
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
creating build\temp.win32-3.6\Release\src
creating build\temp.win32-3.6\Release\src\pymssql
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD “-ID:\Program Files\ISRPA\Python\include” “-ID:\Program Files\ISRPA\Python\include” “-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt” /Tcsrc\pymssql_mssql.c /Fobuild\temp.win32-3.6\Release\src\pymssql_mssql.obj -DMSDBLIB
_mssql.c
src\pymssql_mssql.c(688): fatal error C1083: 无法打开包括文件: “sqlfront.h”: No such file or directory
error: command ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\cl.exe’ failed with exit status 2
micropython-markupbase 3.3.3.post1 requires micropython-re-pcre, which is not installed.
Command ““D:\Program Files\ISRPA\Python\pythons.exe” -u -c “import setuptools, tokenize;file=‘C:\Users\admin\AppData\Local\Temp\pip-install-dzee32bd\pymssql\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\admin\AppData\Local\Temp\pip-record-2374eg0_\install-record.txt –single-version-externally-managed –compile” failed with error code 1 in C:\Users\admin\AppData\Local\Temp\pip-install-dzee32bd\pymssql\
另外,由于公司内部不允许上互联网,如何利用安装。
手动下载 whl 文件,然后拷到公司电脑上,本地安装。
【fatal error C1083: 无法打开包括文件: “sqlfront.h”: No such file or directory】 这个应该是你安装失败的原因吧···