Python import Jenkins 包不起作用
通过pip install Jenkins 安装报错:
ERROR: Command errored out with exit status 1:
command: 'D:\softPath\Python34path\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-pkvnkhvu\\jenkins\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-pkvnkhvu\\jenkins\\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\ADMINI~1\AppData\Local\Temp\pip-record-9m2_gf5f\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-pkvnkhvu\jenkins\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.4
copying jenkins.py -> build\lib.win32-3.4
running build_ext
building 'lookup3' extension
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\softPath\Python34path\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-pkvnkhvu\\jenkins\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-pkvnkhvu\\jenkins\\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\ADMINI~1\AppData\Local\Temp\pip-record-9m2_gf5f\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
解决办法:
1.pip install python-jenkins