近期总结 - 图论相关 cf 936B / cf 949C /ZOJ 3999

本文分享了作者在图论编程竞赛中的经验总结,包括使用DFS解决路径问题、利用强连通分量优化算法等实战技巧,并记录了参加Codeforces比赛的心得体会。

/看了Irene的博文,深受感动,决定也来写点什么东西纪念一下/


/昨天给女队上课讲了bfs也不知道自己弄懂了没有/

最近codeforces rating忽上忽下,终于还是回来啦。

也越来越觉得图论非常有意思,虽然我还在图论外围摸爬滚打,但看起来真的很有趣呀。


下面直接上题:

Codeforces 936B(1B/2D)


第二次打div1,只做了一题就跑路了,本来愉快pretest passed了这题之后开心地睡觉了(大概只是比赛开始40分钟,因为C完全不会做)

但是刚躺下突然想起,哦!我好像错了!

幸运的是,即使只过了一题,还是只-8(rating1912)

昨天修程序才发现错得真是非常彻底。

题意:给定一张有向图,问能否找出一条从顶点开始到一个出度为0的点,路径的长度为偶数。

若有,输出win并还原路径

若不为偶数,如果能到一环,则输出Draw,否则输出Lose。


自己写了傻傻的dfs老半天,缝缝补补问题越来越多,拆东墙补西墙,

意外地还是过了,把一个点拆成两个点,偶数过和奇数过是两种情况。

(感谢栗酱让我明白了判断有没有环竟然是判断在不在栈内的(图论白学.jpg))

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mem(a) memset(a,1,sizeof(a))
typedef long long ll;
typedef pair<int,int> pii;

const int mn=2e5+5;

int n,m;
int s;
vector<int> g[mn];
int vis[mn][2];
int p[mn][2];
int ins[mn][2];
int ans,choose;

vector<int> v;
void dfs(int x,int k){
	ins[x][k%2]=1;
	vis[x][k%2]=k;
	for(int i:g[x]){
		if (ins[i][(k+1)%2]) ans=max(1,ans);
		if (vis[i][(k+1)%2]) continue;
        else{
			p[i][(k+1)%2]=x;
            dfs(i,k+1);
        }
	}
	if (g[x].size()==0&&k%2==0){
		ans=k;
		choose=x;
	}
	ins[x][k%2]=0;
}

int main() {
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++){
		int u;
		scanf("%d",&u);
		for(int j=1;j<=u;j++){
			int v;
			scanf("%d",&v);
			g[i].pb(v);
		}
	}
	scanf("%d",&s);
	dfs(s,1);
    if (ans==1) puts("Draw");
    else if (!ans) puts("Lose");
    else{
		v.clear();
        puts("Win");
        int now=choose;
        v.pb(now);
        while(ans>1){
			//printf("%d ",now);
            now=p[now][ans%2];
            ans--;
            v.pb(now);
        }
        reverse(v.begin(),v.end());
		for(int i:v) printf("%d ",i);
    }
	return 0;
}

啊啊,总之非常神奇,就ac了。


第三场div1

对于Codeforces 949C(1C),又是经典图论题。

题目贼长,简直窒息。又正好被上一题找规律打的头晕目眩。

然后这把就正式掉出div1了,弘毅大大却借这场成功上紫,从此阴阳两隔(弥天大雾)

题意:经过复杂变换后,可以得到一张有向图,任意在有向图上选择至少一个点,但必须使所有该点可达的点也全部被选中。

问最少能选几个点(并给出点集)。



又是自己写了半天dfs发现,哇,怎么怎么写怎么错。

突然想起原来还有强连通分量的板子,发现我竟然手写不出来。

板子看了看都有点忘记了,拿出了以前的几个程序看了看,哇,真神奇啊。

(学的比忘得快系列)

然后终于AC了。

#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mem(a) memset(a,0,sizeof(a))
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int mn=1e5+5;

int n,m,h;
int a[mn],out[mn];
vector<pii> e;
vector<int> g[mn],v,ans;
int pre[mn],lowlink[mn],sccno[mn],dfsc,sccc;
vector<int> scc[mn];
stack<int> s;

void dfs(int u){
	pre[u]=lowlink[u]=++dfsc;
	s.push(u);
	for(int i=0;i<g[u].size();i++){
        int v=g[u][i];
        if (!pre[v]){
			dfs(v);
            lowlink[u]=min(lowlink[u],lowlink[v]);
        }else if (!sccno[v]){
        	lowlink[u]=min(lowlink[u],pre[v]);
		}
	}
	if (lowlink[u]==pre[u]){
		sccc++;
		while(1){
			int x=s.top();s.pop();
			sccno[x]=sccc;
			if (x==u) break;
		}
	}
}

void find_scc(){
	dfsc=sccc=0;
    mem(sccno);mem(pre);
    for(int i=1;i<=n;i++) if(!pre[i]) dfs(i);
}

int main() {
	scanf("%d%d%d",&n,&m,&h);
	for(int i=1; i<=n; i++)
		scanf("%d",&a[i]);
	for(int i=1; i<=m; i++) {
		int u,v;
		scanf("%d %d",&u,&v);
		if (u>v)
			swap(u,v);
		e.pb(pii(u,v));
	}
	sort(e.begin(),e.end());
	e.erase(unique(e.begin(),e.end()),e.end());
	for(int i=0; i<e.size(); i++) {
		int u=e[i].first,v=e[i].second;
		if ((a[u]+1)%h==a[v])
			g[u].pb(v);
		if ((a[v]+1)%h==a[u])
			g[v].pb(u);
	}
	/*for(int i=1; i<=n; i++) {
		printf("%d:",i);
		for(int j:g[i])
			printf("%d ",j);
		puts("");
	}*/
    find_scc();
    for(int i=1;i<=n;i++){
        for(auto j:g[i]){
            if (sccno[i]!=sccno[j]){
				out[sccno[i]]=1;
            }
        }
        scc[sccno[i]].pb(i);
    }
    for(int i=1;i<=sccc;i++){
        if (!out[i]&&(ans.empty()||ans.size()>scc[i].size())) ans=scc[i];
    }
    //answer
	printf("%d\n",ans.size());
	for(int i:ans)
		printf("%d ",i);
	return 0;
}


幸运的是昨晚(今天早上codeforces round470)题目非常好,我又回来了,div1!

Trie树竟然还记得!佩服我自己。

2B坚信水题一条路可以走到底暴力卡常竟然过了。

以后有空学学字符串,在字符串方面简直小白了。


今天还和团队做了ZOJ Monthly January,2018

题目真的难到窒息了,发现我的队友真是强到爆炸,除了写模拟题只能划水的我……

写了个多项式洛必达法则就全程划水了……

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 10005;
#define pb push_back
typedef pair<int,int> pii;
typedef long long ll;

char s[N],s1[N];
int n,m;
ll x0;
ll su,sd;

vector<pii> u,d;//up / down

char *p;

ll gcd(ll a,ll b){
    return !b?a:gcd(b,a%b);
}

pii getu(){
    int u=1,v=0;
    if (*p=='+') p++;
    else if (*p=='-') u*=-1,p++;
    if (*p!='x'){
        u*=(*p)-'0';
        p++;
    }
    if (*p=='+'||*p=='-'||*p==0) return pii(u,0);
    else {
        assert(*p=='x');
        p++;
        v++;
        if (*p=='^'){
            p++;
            v=*p-'0';
            p++;
        }
    }
    return pii(u,v);
}

void luobida(){
    vector<pii> t;
    for(pii i:u) {
        i.first*=i.second;
        if(i.second) t.pb(pii(i.first,i.second-1));
    }
    u=t;
    t.clear();
    for(pii i:d) {
        i.first*=i.second;
        if(i.second) t.pb(pii(i.first,i.second-1));
    }
    d=t;
}

ll px0[10];

void getsum(){
    su=sd=0;
    for(pii &i:u){
        su+=i.first*px0[i.second];
    }
    for(pii &i:d){
        sd+=i.first*px0[i.second];
    }
}

int main() {
    int t; scanf("%d", &t);
    while (t--) {
        u.clear();d.clear();
        scanf("%s%s",s,s1);
        p=s;
        while(*p!=0) u.pb(getu());
        p=s1;
        while(*p!=0) d.pb(getu());
        scanf("%lld",&x0);
        px0[0]=1;
        for(int i=1;i<=9;i++) px0[i]=px0[i-1]*x0;
        getsum();
        while(!sd&&!su){
            luobida();
            getsum();
        }
        if (!sd){
            puts("INF");
            continue;
        }
        if (!su){
            puts("0");
            continue;
        }
        ll g=gcd(su,sd);
        su/=g,sd/=g;
        if (sd<0){
            su*=-1;
            sd*=-1;
        }
        if (sd==1) printf("%lld\n",su);
        else printf("%lld/%lld\n",su,sd);
    }
}

想好好学学图论和工具了,

发现原来自己真的什么都不懂啊……


加油!

D:\pojiebtc\TeamHunter_Version1.6>pip install PyQt6 Collecting PyQt6 Using cached PyQt6-6.6.1.tar.gz (1.0 MB) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-77draeyf\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' cwd: None Complete output (4 lines): Collecting sip<7,>=6.5 Using cached sip-6.5.1-cp36-abi3-win_amd64.whl (521 kB) ERROR: Could not find a version that satisfies the requirement PyQt-builder<2,>=1.15 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.11.0, 1.12.0, 1.12.1, 1.12.2) ERROR: No matching distribution found for PyQt-builder<2,>=1.15 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/8c/2b/6fe0409501798abc780a70cab48c39599742ab5a8168e682107eaab78fca/PyQt6-6.6.1.tar.gz#sha256=9f158aa29d205142c56f0f35d07784b8df0be28378d20a97bcda8bd64ffd0379 (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-77draeyf\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' Check the logs for full command output. Using cached PyQt6-6.6.0.tar.gz (1.0 MB) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-baknb3db\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' cwd: None Complete output (4 lines): Collecting sip<7,>=6.5 Using cached sip-6.5.1-cp36-abi3-win_amd64.whl (521 kB) ERROR: Could not find a version that satisfies the requirement PyQt-builder<2,>=1.15 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.11.0, 1.12.0, 1.12.1, 1.12.2) ERROR: No matching distribution found for PyQt-builder<2,>=1.15 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/17/dc/969e2da415597b328e6a73dc233f9bb4f2b312889180e9bbe48470c957e7/PyQt6-6.6.0.tar.gz#sha256=d41512d66044c2df9c5f515a56a922170d68a37b3406ffddc8b4adc57181b576 (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-baknb3db\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' Check the logs for full command output. Downloading PyQt6-6.5.3.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 285 kB/s Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_mdfu7fb\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' cwd: None Complete output (4 lines): Collecting sip<7,>=6.5 Using cached sip-6.5.1-cp36-abi3-win_amd64.whl (521 kB) ERROR: Could not find a version that satisfies the requirement PyQt-builder<2,>=1.15 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.11.0, 1.12.0, 1.12.1, 1.12.2) ERROR: No matching distribution found for PyQt-builder<2,>=1.15 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/18/b8/74667c8108d8481b87f8d87e6d962b64eb53ea21432cdbfbfeee4d2b4430/PyQt6-6.5.3.tar.gz#sha256=bcbbf9511b038b4924298ca10999aa36eb37a0a38d0638f895f9bba6025c0a77 (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_mdfu7fb\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' Check the logs for full command output. Downloading PyQt6-6.5.2.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 656 kB/s Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-wcm587pq\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' cwd: None Complete output (4 lines): Collecting sip<7,>=6.5 Using cached sip-6.5.1-cp36-abi3-win_amd64.whl (521 kB) ERROR: Could not find a version that satisfies the requirement PyQt-builder<2,>=1.15 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.11.0, 1.12.0, 1.12.1, 1.12.2) ERROR: No matching distribution found for PyQt-builder<2,>=1.15 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/34/da/e03b7264b1e88cd553ff62a71c0c19f55690e08928130f4aae613723e535/PyQt6-6.5.2.tar.gz#sha256=1487ee7350f9ffb66d60ab4176519252c2b371762cbe8f8340fd951f63801280 (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-wcm587pq\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' Check the logs for full command output. Downloading PyQt6-6.5.1.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 1.1 MB/s Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-up_ke487\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' cwd: None Complete output (4 lines): Collecting sip<7,>=6.5 Using cached sip-6.5.1-cp36-abi3-win_amd64.whl (521 kB) ERROR: Could not find a version that satisfies the requirement PyQt-builder<2,>=1.15 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.11.0, 1.12.0, 1.12.1, 1.12.2) ERROR: No matching distribution found for PyQt-builder<2,>=1.15 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/1c/77/3b14889ac1e677bd5a284e0d003cac873689046e328401d92a927c9cc921/PyQt6-6.5.1.tar.gz#sha256=e166a0568c27bcc8db00271a5043936226690b6a4a74ce0a5caeb408040a97c3 (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-up_ke487\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' Check the logs for full command output. Downloading PyQt6-6.5.0.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 1.1 MB/s Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-x27e1v5f\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' cwd: None Complete output (4 lines): Collecting sip<7,>=6.5 Using cached sip-6.5.1-cp36-abi3-win_amd64.whl (521 kB) ERROR: Could not find a version that satisfies the requirement PyQt-builder<2,>=1.15 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.11.0, 1.12.0, 1.12.1, 1.12.2) ERROR: No matching distribution found for PyQt-builder<2,>=1.15 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/28/01/9e4b91cb0c1023934b1dc654c5bbfc29cbabcbf6092f936b74aee46dd637/PyQt6-6.5.0.tar.gz#sha256=b97cb4be9b2c8997904ea668cf3b0a4ae5822196f7792590d05ecde6216a9fbc (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-x27e1v5f\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=6.5, <7' 'PyQt-builder >=1.15, <2' Check the logs for full command output. Downloading PyQt6-6.4.2.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 1.3 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmp9jy9jmkb' cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-q20zf_6x\pyqt6_67ae0ab6d10b477c897f0454abf0efcc Complete output (34 lines): Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte (sitecustomize.py, line 7) Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 156, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 121, in import_callable spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "project.py", line 25, in <module> from pyqtbuild import PyQtBindings, PyQtProject, QmakeTargetInstallable ModuleNotFoundError: No module named 'pyqtbuild' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "D:\安装位置\btc\lib\site-packages\sipbuild\api.py", line 51, in build_wheel project = AbstractProject.bootstrap('pep517') File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 68, in bootstrap project_factory = cls.import_callable(default_factory_py, cls) File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 124, in import_callable detail=str(e)) sipbuild.exceptions.UserException ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/c3/e0/e1b592a6253712721612e2e64a323930a724e1f5cf297ed5ec6d6c86dda1/PyQt6-6.4.2.tar.gz#sha256=740244f608fe15ee1d89695c43f31a14caeca41c4f02ac36c86dfba4a5d5813d (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmp9jy9jmkb' Check the logs for full command output. Downloading PyQt6-6.4.1.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 1.6 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmp1dust89i' cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-q20zf_6x\pyqt6_8d97b5793faf458b86ace843feaa89c0 Complete output (34 lines): Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte (sitecustomize.py, line 7) Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 156, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 121, in import_callable spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "project.py", line 25, in <module> from pyqtbuild import PyQtBindings, PyQtProject, QmakeTargetInstallable ModuleNotFoundError: No module named 'pyqtbuild' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "D:\安装位置\btc\lib\site-packages\sipbuild\api.py", line 51, in build_wheel project = AbstractProject.bootstrap('pep517') File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 68, in bootstrap project_factory = cls.import_callable(default_factory_py, cls) File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 124, in import_callable detail=str(e)) sipbuild.exceptions.UserException ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/8a/a6/12565a8b14faaeb3ecf3edb5bc1e6bcb622dab776c23ea4eb4c369176c75/PyQt6-6.4.1.tar.gz#sha256=0c1dcadf161331cfdbde0906c05f7f8048dc4907d717647c33bbc4404146f59f (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmp1dust89i' Check the logs for full command output. Downloading PyQt6-6.4.0.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 1.3 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmpl0bvpgjd' cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-q20zf_6x\pyqt6_172bf76e7c2d46c7a75852ec4c5ba059 Complete output (34 lines): Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte (sitecustomize.py, line 7) Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 156, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 121, in import_callable spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "project.py", line 25, in <module> from pyqtbuild import PyQtBindings, PyQtProject, QmakeTargetInstallable ModuleNotFoundError: No module named 'pyqtbuild' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "D:\安装位置\btc\lib\site-packages\sipbuild\api.py", line 51, in build_wheel project = AbstractProject.bootstrap('pep517') File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 68, in bootstrap project_factory = cls.import_callable(default_factory_py, cls) File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 124, in import_callable detail=str(e)) sipbuild.exceptions.UserException ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/b2/c9/266b12a9826452e387f0ff4f0b4bbd29e11d2de81a5f60c0975933b34e7f/PyQt6-6.4.0.tar.gz#sha256=91392469be1f491905fa9e78fa4e4059a89ab616ddf2ecfd525bc1d65c26bb93 (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmpl0bvpgjd' Check the logs for full command output. Downloading PyQt6-6.3.1.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 2.2 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmpy7_zonsq' cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-q20zf_6x\pyqt6_0a707fa5c34a42ada967d354d9a71095 Complete output (34 lines): Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte (sitecustomize.py, line 7) Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 156, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 121, in import_callable spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "project.py", line 25, in <module> from pyqtbuild import PyQtBindings, PyQtProject, QmakeTargetInstallable ModuleNotFoundError: No module named 'pyqtbuild' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "D:\安装位置\btc\lib\site-packages\sipbuild\api.py", line 51, in build_wheel project = AbstractProject.bootstrap('pep517') File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 68, in bootstrap project_factory = cls.import_callable(default_factory_py, cls) File "D:\安装位置\btc\lib\site-packages\sipbuild\abstract_project.py", line 124, in import_callable detail=str(e)) sipbuild.exceptions.UserException ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/a3/ab/c5989de70eceed91abf5f828d99817462ff75f41558e9f5a6f5213f0932c/PyQt6-6.3.1.tar.gz#sha256=8cc6e21dbaf7047d1fc897e396ccd9710a12f2ef976563dad65f06017d2c9757 (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'D:\安装位置\btc\python.exe' 'D:\安装位置\btc\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmpy7_zonsq' Check the logs for full command output. Downloading PyQt6-6.3.0.tar.gz (1.0 MB) |████████████████████████████████| 1.0 MB 2.2 MB/s
最新发布
09-30
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值