我一直在尝试在我的mac上安装musicbrainz服务器,并且我需要安装pip pyicu.我一直收到这个错误:
Collecting pyicu
Downloading PyICU-1.9.5.tar.gz (181kB)
100% |????????????????????????????????| 184kB 515kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-E50o2C/pyicu/setup.py", line 11, in <module>
ICU_VERSION = subprocess.check_output(('icu-config', '--version')).strip()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
----------------------------------------
Command "python setup.py egg_info" failed …Run Code Online (Sandbox Code Playgroud) SignInWithAppleButton我在使用 SwiftUI时遇到一些问题signInWithAppleButtonStyle。我正在尝试根据用户当前的方案或它是否发生变化来更改按钮的颜色。这是 iOS 14 和 SwiftUI:
@Environment(\.colorScheme) var currentScheme
@State var appleButtonWhite = false
VStack{
SignInWithAppleButton(
.signUp,
onRequest: { request in
request.requestedScopes = [.fullName, .email]
},
onCompletion: { result in
switch result {
case .success (let authResults):
print("Authorization successful.")
case .failure (let error):
print("Authorization failed: " + error.localizedDescription)
}
}
)
.frame(minWidth: 0, maxWidth: .infinity)
.signInWithAppleButtonStyle(appleButtonWhite ? .white : .black)
}
.onChange(of: currentScheme, perform: { (scheme) in
if scheme == .light
{
appleButtonWhite = false
}
else …Run Code Online (Sandbox Code Playgroud)