python 无法使用pip安装jenkins

9rygscc1  于 2023-06-04  发布在  Python
关注(0)|答案(2)|浏览(428)
C:\code>pip install jenkins
Collecting jenkins
  Using cached jenkins-1.0.2.tar.gz (8.2 kB)
  Preparing metadata (setup.py) ... done
Installing collected packages: jenkins
  DEPRECATION: jenkins is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for jenkins ... error
  error: subprocess-exited-with-error

  × Running setup.py install for jenkins did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running install
      C:\python\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      copying jenkins.py -> build\lib.win-amd64-cpython-311
      running build_ext
      building 'lookup3' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of 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.
╰─> jenkins

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip

已尝试:Pip error: Microsoft Visual C++ 14.0 is required
获取此错误:

通过UI安装很好,如评论中所述:

还是没找到有什么建议吗?
操作系统:Windows 10

0yg35tkg

0yg35tkg1#

根据https://github.com/pypa/pip/issues/8559,可以在pip命令中添加--use-pep517

pip install --use-pep517 jenkins

并确保您有Microsoft Visual C++ 14.0或greater

u5i3ibmn

u5i3ibmn2#

是Python-Jenkins而不是Jenkins。我想知道他们为什么这样命名它。

相关问题