成功解决pip:This error originates from a subprocess, and is likely not a problem with pip. 轩详细教程

Posted 轩哥啊哈OvO

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了成功解决pip:This error originates from a subprocess, and is likely not a problem with pip. 轩详细教程相关的知识,希望对你有一定的参考价值。

目录

一、报错发生

二、报错原因

三、解决方法


一、报错发生

最近把Python升级到了3.11,重新下载了一些模块,但下载安装pygame的时候发生了如下报错:

This error originates from a subprocess, and is likely not a problem with pip. 

详细报错内容:

error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [77 lines of output]

    ...
    ...

    [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

╰─> See above for output.

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


二、报错原因

之前下载pygame的时候是没有发生如上情况的,但当时用的Python版本是3.5、3.10,所以猜想是pygame版本不兼容的问题。

输入 pip install pygame== 查看pygame的版本信息。输出:

ERROR: Could not find a version that satisfies the requirement pygame== 
(from versions: 1.9.2rc1, 1.9.2, 1.9.3, 1.9.4.dev0, 1.9.4rc1,ev20, 
    2.0.0.dev22, 2.0.0.dev24, 2.0.0, 2.0.1.dev1, 2.0.1, 2.0.2.dev4, 2.0.2, 
    2.0.3.dev2, 2.0.3.dev4, 2.0.3.dev6, 2.0.3, 2.1.0.dev2, 2.1.0, 2.1.1.dev2, 
    2.1.1.dev4, 2.1.1, 2.1.2, 2.1.3.dev2, 2.1.3.dev4, 2.1.3.dev6, 2.1.3.dev8)
ERROR: No matching distribution found for pygame==

pip默认下载最新的正式版2.1.2,但这个版本最高支持Python3.10。

所以我们输入指令 pip install pygame==2.1.3.dev8 下载最新测试版。 最终下载成功:

Successfully installed pygame-2.1.3.dev8

三、解决方法

· 下载模块时尝试下载较新的版本,以避免不兼容的情况发生


如果对你有帮助的话,就支持一下吧~

解决Jenkins上git出现的“ERROR: Error fetching remote repo 'origin'”问题

这两天在搭建Jenkins环境,在构建新job时报ERROR: Error fetching remote repo \'origin\',具体错误如下:

Started by user wupan
Building in workspace /root/.jenkins/workspace/deploy
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url {url} # timeout=10
Fetching upstream changes from {url}
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress {url} +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo \'origin\'
hudson.plugins.git.GitException: Failed to fetch from {url}
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
	at hudson.scm.SCM.checkout(SCM.java:504)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
	at hudson.model.Run.execute(Run.java:1727)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress {url} +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: remote: Counting objects: 62, done.        
remote: Compressing objects:   4% (1/23)           
remote: Compressing objects:   8% (2/23)           
remote: Compressing objects:  13% (3/23)           
remote: Compressing objects:  17% (4/23)           
remote: Compressing objects:  21% (5/23)           
remote: Compressing objects:  26% (6/23)           
remote: Compressing objects:  30% (7/23)           
remote: Compressing objects:  34% (8/23)           
remote: Compressing objects:  39% (9/23)           
remote: Compressing objects:  43% (10/23)           
remote: Compressing objects:  47% (11/23)           
remote: Compressing objects:  52% (12/23)           
remote: Compressing objects:  56% (13/23)           
remote: Compressing objects:  60% (14/23)           
remote: Compressing objects:  65% (15/23)           
remote: Compressing objects:  69% (16/23)           
remote: Compressing objects:  73% (17/23)           
remote: Compressing objects:  78% (18/23)           
remote: Compressing objects:  82% (19/23)           
remote: Compressing objects:  86% (20/23)           
remote: Compressing objects:  91% (21/23)           
remote: Compressing objects:  95% (22/23)           
remote: Compressing objects: 100% (23/23)           
remote: Compressing objects: 100% (23/23), done.        
error: unpack-objects died of signal 15
fatal: unpack-objects failed

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
	... 11 more
ERROR: Error fetching remote repo \'origin\'
Finished: FAILURE

遇到问题后,开始了漫长的百度,有网友提供了下面几个解决的思路。

解决思路:

1、第一时间发现应该是权限问题,那么可以切换成git协议或者https的协议去获取。

2、如果不是协议的问题,看是不是git的路径错了导致的,再次配置节点的机器上的git路径。

3、如果是linux的机器,就要去确定是不是SSH的key导致的,而且用ssh去连接git,那么就要去配置ssh的key,这一点比较复杂也很重要。

 

解决方案:

一、权限问题导致

1、配置Jenkins的Git环境

Name:Git用户名,我配置的是GitHub的用户名,大家可以试试其他的

Path to Git executable:Git安装路径(Linux命令:which git、windows 命令: where git)

2、把私钥拷贝到git配置中

在源码管理中,点击Add,添加秘钥

Repository URL:git代码地址

Credentials:秘钥

Kind:选择SSH Username with private key

Username:随便填写

Private Key:选择Enter directly

Key:系统生成的git id_rsa中的Key

2)输入完成后点击保存,源码管理中填写

Repository URL:git代码地址

Credentials:秘钥(选择刚才填写的UserName)

3)点击保存,重新构建Job,结果成功

 

二、将url改成http://用户名:密码@ip/的格式,git配置改成不使用密码(网友提供色解决方案未尝试,大家可以去试试)

 

如果有问题,可以在下面评论,谢谢

 

以上是关于成功解决pip:This error originates from a subprocess, and is likely not a problem with pip. 轩详细教程的主要内容,如果未能解决你的问题,请参考以下文章

React开发(271):UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated e(

ERROR: Error fetching remote repo 'origin' 错误解决

解决Jenkins上git出现的“ERROR: Error fetching remote repo 'origin'”问题

Jenkins报错Error fetching remote repo ‘origin‘真正解决办法

jenkins windows slave 报错ERROR: Error cloning remote repo 'origin'

python中使用pip安装报错:Fatal error in launcher... 解决方法