问题标签 [macbookpro-touch-bar]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python-3.x - gobject-2.0-0 无法在 macbook 上加载
当我在 mac 上启动我的烧瓶 python3 应用程序时,我遇到了这个错误。
OSError: 无法加载库 'gobject-2.0-0': dlopen(gobject-2.0-0, 2): image not found。此外,ctypes.util.find_library() 无法找到名为“gobject-2.0-0”的库
我在我的项目中使用 weasyprint 导致了这个问题。
我尝试安装 glib,它已安装在我的系统中
macos - 如何以编程方式在 MacOS 上的触摸栏布局之间切换?
系统
M1 MacBook Pro
MacOS 大苏尔
问题
我喜欢日常使用的默认 Mac 触控栏布局,但我更喜欢在编程时触手可及的 F1-F12 键。我也不喜欢按住 fn 键。这就是为什么我写了两个 AppleScripts 来切换布局(包括在下面)。
脚本工作,但他们是错误的。这是因为他们依赖于打开系统偏好设置应用程序并在菜单中导航。我用 Automator 制作了几个“应用程序”,它们简单地运行脚本,然后将它们分配给键盘快捷键。
这是一个不错的解决方案,但我想做一些更优雅的事情。理想情况下,我的脚本应该在幕后运行并立即更改触摸栏布局,而不是打开系统偏好设置,从下拉列表中选择项目,然后最后关闭系统偏好设置。
在求助于使用 Automator 之前,我在 shell 上搞砸了很长一段时间都没有成功。那些对事情更精通的人有什么建议吗?
代码
这使得 F1-F12 键成为默认的触摸栏布局:
而这个则相反(使应用程序控制默认的触摸栏布局):
python - 在 Macbook pro M1 上的 tensorflow-metal 上运行 python 代码时出错
我已经在我的 Macbook pro M1 上成功安装了 tensorflow-metal 在一个单独的环境中,但是当我运行以下示例代码时:
我得到了这些错误:
2021-10-10 09:26:08.398847: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] 未启用 MLIR 优化通道(注册 2)2021-10-10 09:26:08.399120: W tensorflow/ core/platform/profile_utils/cpu_utils.cc:128] 无法获得 CPU 频率:0 Hz Epoch 1/10 2021-10-10 09:26:08.554082: I tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:112] device_type GPU 的插件优化器已启用。2021-10-10 09:26:08.581 python[65936:4662219] -[MPSGraph adamUpdateWithLearningRateTensor:beta1Tensor:beta2Tensor:epsilonTensor:beta1PowerTensor:beta2PowerTensor:valuesTensor:momentumTensor:velocityTensor:maximumVelocityTensor:gradient selector unrecognized instance: 0x16a877460 2021-10-10 09:26:08.594 python[65936:4662219] *** 由于未捕获的异常而终止应用程序'forwarding + 1444 4 CoreFoundation 0x0000000192906b20 _CF_forwarding_prep_0 + 96 5
libmetal_plugin.dylib 0x000000012e81a290 _ZN12metal_plugin14MPSApplyAdamOpIfEC2EPNS_20OpKernelConstructionE + 656 6 libmetal_plugin.dylib 0x000000012e819ebc _ZN12metal_pluginL14CreateOpKernelINS_14MPSApplyAdamOpIfEEEEPvP23TF_OpKernelConstruction
- 52 7 libtensorflow_framework.2.dylib 0x00000001192545d4 _ZN10tensorflow12_GLOBAL__N_120KernelBuilderFactory6CreateEPNS_20OpKernelConstructionE
- 88 8 libtensorflow_framework.2.dylib 0x00000001192d6158 _ZN10tensorflow14CreateOpKernelENS_10DeviceTypeEPNS_10DeviceBaseEPNS_9AllocatorEPNS_22FunctionLibraryRuntimeEPNS_11ResourceMgrERKNSt3__110shared_ptrIKNS_14NodePropertiesEEEIPPNS_O8
- 784 9 libtensorflow_framework.2.dylib 0x00000001194b12b8 _ZN10tensorflow21CreateNonCachedKernelEPNS_6DeviceEPNS_22FunctionLibraryRuntimeERKNSt3__110shared_ptrIKNS_14NodePropertiesEEEiPPNS_8OpKernelE
- 272 10 libtensorflow_framework.2.dylib 0x000000011945bc20 _ZN10tensorflow26FunctionLibraryRuntimeImpl12CreateKernelERKNSt3__110shared_ptrIKNS_14NodePropertiesEEEPNS_22FunctionLibraryRuntimeEPPNS_8OpKernelE
- 600 11 libtensorflow_framework.2.dylib 0x00000001194c6430 _ZN10tensorflow22ImmutableExecutorState10InitializeERKNS_5GraphE + 1192 12 libtensorflow_framework.2.dylib 0x00000001194b1064 _ZN10tensorflow16NewLocalExecutorERKNS_19LocalExecutorParamsERKNS_5GraphEPPNS_8ExecutorE
- 304 13 libtensorflow_framework.2.dylib 0x00000001194bee6c _ZN10tensorflow12_GLOBAL__N_124DefaultExecutorRegistrar7Factory11NewExecutorERKNS_19LocalExecutorParamsERKNS_5GraphEPNSt3__110unique_ptrINS_8ExecutorENS9_14default_deleteISB_EEEE + 48 14 libtensorflow_framework.2.dylib 0x00000001194bf7e8 _ZN10tensorflow11NewExecutorERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_19LocalExecutorParamsERKNS_5GraphEPNS0_10unique_ptrINS_8ExecutorENS0_14default_deleteISG_EEEE
- 92 15 libtensorflow_framework.2.dylib 0x000000011945e278 _ZN10tensorflow26FunctionLibraryRuntimeImpl10CreateItemEPPNS0_4ItemE + 2676 16 libtensorflow_framework.2.dylib 0x000000011945f06c _ZN10tensorflow26FunctionLibraryRuntimeImpl3RunERKNS_22FunctionLibraryRuntime7OptionsEyN4absl12lts_202103244SpanIKNS_6TensorEEEPNSt3__16vectorIS8_NSB_9allocatorIS8_EEEENSB_8functionIFvRKNS_6StatusEEEE
- 676 17 libtensorflow_framework.2.dylib 0x000000011946d0c0 _ZNK10tensorflow29ProcessFunctionLibraryRuntime14RunMultiDeviceERKNS_22FunctionLibraryRuntime7OptionsEyPNSt3__16vectorIN4absl12lts_202103247variantIJNS_6TensorENS_11TensorShapeEEEENS5_9allocatorISC_EEEEPNS6_INS5_10unique_ptrINS0_11CleanUpItemENS5_14default_deleteISI_EEEENSD_ISL_EEEENS5_8functionIFvRKNS_6StatusEEEENSP_IFSQ_RKNS0_21ComponentFunctionDataEPNS0_12InternalArgsEEEE
- 2640 18 libtensorflow_framework.2.dylib 0x0000000119470098 _ZNK10tensorflow29ProcessFunctionLibraryRuntime3RunERKNS_22FunctionLibraryRuntime7OptionsEyN4absl12lts_202103244SpanIKNS_6TensorEEEPNSt3__16KNSvectorIS8_NSBEEB8functionlocatorIS8_NSBEEB8FunctionR
- 2012 19 libtensorflow_framework.2.dylib 0x0000000119470868 _ZNK10tensorflow29ProcessFunctionLibraryRuntime7RunSyncERKNS_22FunctionLibraryRuntime7OptionsEyN4absl12lts_202103244SpanIKNS_6TensorEEEPNSt3__16vectorIS8_NSB_9allocatorIS8_EEEE + 160 20 _pywrap_tensorflow_internal.so 0x000000014c175538 _ZN10tensorflow19KernelAndDeviceFunc3RunEPNS_19ScopedStepContainerERKNS_15EagerKernelArgsEPNSt3__16vectorIN4absl12lts_202103247variantIJNS_6TensorENS_11TensorShapeEEEENS6_9allocatorISD_EEEEPNS_19CancellationManagerERKNS9_8optionalINS_25EagerRemoteFunctionParamsEEERKNSK_INS_17ManagedStackTraceEEE
- 516 21 _pywrap_tensorflow_internal.so 0x000000014c13fd44 _ZN10tensorflow18EagerKernelExecuteEPNS_12EagerContextERKN4absl12lts_2021032413InlinedVectorIPNS_12TensorHandleELm4ENSt3__19allocatorIS6_EEEERKNS3_8optionalINS_25EagerRemoteFunctionParamsEEERKNS7_10unique_ptrINS_15KernelAndDeviceENS_4core15RefCountDeleterEEEPNS_14GraphCollectorEPNS_19CancellationManagerENS3_4SpanIS6_EERKNSD_INS_17ManagedStackTraceEEE + 372 22 _pywrap_tensorflow_internal.so 0x000000014c1463a8 _ZN10tensorflow11ExecuteNode3RunEv + 396 23 _pywrap_tensorflow_internal.so 0x000000014c481748 _ZN10tensorflow13EagerExecutor11SyncExecuteEPNS_9EagerNodeE + 172 24 _pywrap_tensorflow_internal.so 0x000000014c13f880 _ZN10tensorflow12_GLOBAL__N_117EagerLocalExecuteEPNS_14EagerOperationEPPNS_12TensorHandleEPi
- 1976 25 _pywrap_tensorflow_internal.so 0x000000014c13da28 _ZN10tensorflow12EagerExecuteEPNS_14EagerOperationEPPNS_12TensorHandleEPi
- 296 26 _pywrap_tensorflow_internal.so 0x000000014bda2b88 _ZN10tensorflow14EagerOperation7ExecuteEN4absl12lts_202103244SpanIPNS_20AbstractTensorHandleEEEPi
- 192 27 _pywrap_tensorflow_internal.so 0x000000014c17b910 _ZN10tensorflow21CustomDeviceOpHandler7ExecuteEPNS_27ImmediateExecutionOperationEPPNS_30ImmediateExecutionTensorHandleEPi
- 468 28 _pywrap_tensorflow_internal.so 0x00000001489c7f1c TFE_Execute + 80 29 _pywrap_tensorflow_internal.so
0x0000000148944934 _Z24TFE_Py_ExecuteCancelableP11TFE_ContextPKcS2_PN4absl12lts_2021032413InlinedVectorIP16TFE_TensorHandleLm4ENSt3__19allocatorIS7_EEEEP7_objectP23TFE_CancellationManagerPNS5_IS7_Lm2ESA_EEP9TF_Status- 616 30 _pywrap_tfe.so 0x000000011a6ea4c0 ZN10tensorflow32TFE_Py_ExecuteCancelable_wrapperERKN8pybind116handleEPKcS5_S3_S3_PNS_19CancellationManagerES3 + 160 31 _pywrap_tfe.so 0x000000011a71b220 _ZZN8pybind1112cpp_function10initializeIZL25pybind11_init__pywrap_tfeRNS_7module_EE4$ 44NS_6objectEJRKNS_6handleEPKcSA_S8_S8_S8_EJNS_4nameENS_5scopeENS_7siblingEEEEvOT_PFT0_DpT1_EDpRKT2_ENUlRNS_6detail13function_callEE_8__invokeESR
- 184 32 _pywrap_tfe.so 0x000000011a6fd16c ZN8pybind1112cpp_function10dispatcherEP7_objectS2_S2 + 3216 33 python 0x00000001043e58cc cfunction_call_varargs + 292 34 python
0x00000001043e4f50 _PyObject_MakeTpCall + 640 35 python
0x00000001044fa3e0 call_function + 680 36 python
0x00000001044f6ebc _PyEval_EvalFrameDefault + 29472 37 python
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 38 python
0x00000001043e5f10 _PyFunction_Vectorcall + 236 39 python
0x00000001044fa348 call_function + 528 40 蟒蛇
0x00000001044f6fac _PyEval_EvalFrameDefault + 29712 41 蟒蛇
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 42 蟒蛇
0x00000001043e5f10 _PyFunction_Vectorcall + 236 43 python
0x00000001043e991c method_vectorcall + 156 44 python
0x00000001044fa348 call_function + 528 45 python
0x00000001044f6fac _PyEval_EvalFrameDefault + 29712 46 python
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 47 python
0x00000001043e5f10 _PyFunction_Vectorcall + 236 48 python
0x00000001043e991c method_vectorcall + 156 49 python
0x00000001044fa348 call_function + 528 50 python
0x00000001044f6fac _PyEval_EvalFrameDefault + 29712 51 蟒蛇
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 52 蟒蛇
0x00000001043e5f10 _PyFunction_Vectorcall + 236 53 蟒蛇
0x00000001043e4b84 _PyObject_FastCallDict + 132 54 python
0x00000001043e6cc4 _PyObject_Call_Prepend + 156 55 python
0x000000010445a774 slot_tp_call + 296 56 python
0x00000001043e56e8 PyObject_Call + 312 57 python
0x00000001044f714c _PyEval_EvalFrameDefault + 30128 58 python
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 59 python
0x00000001043e5f10 _PyFunction_Vectorcall + 236 60 python
0x00000001043e9a88 method_vectorcall + 520 61 python
0x00000001043e54c0 PyVectorcall_Call + 120 62 蟒蛇
0x00000001044f714c _PyEval_EvalFrameDefault + 30128 63 蟒蛇
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 64 蟒蛇
0x00000001043e5f10 _PyFunction_Vectorcall + 236 65 python
0x00000001043e4c1c _PyObject_FastCallDict + 284 66 python
0x00000001043e6cc4 _PyObject_Call_Prepend + 156 67 python
0x000000010445a774 slot_tp_call + 296 68 python
0x00000001043e4f50 _PyObject_MakeTpCall + 640 69 python
0x00000001044fa3e0 call_function + 680 70 python
0x00000001044f6ebc _PyEval_EvalFrameDefault + 29472 71 python
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 72 python
0x00000001043e5f10 _PyFunction_Vectorcall + 236 73 python
0x00000001043e991c method_vectorcall + 156 74 python
0x00000001044fa348 call_function + 528 75 python
0x00000001044f6fac _PyEval_EvalFrameDefault + 29712 76 python
0x00000001044ef584 _PyEval_EvalCodeWithName + 3340 77 python
0x000000010454c0b0 PyRun_InteractiveOneObjectEx + 1196 78 python
0x00000001045488d0 PyRun_InteractiveLoopFlags + 540 79 python
0x000000010454863c PyRun_AnyFileExFlags + 72 80 python
0x00000001045710fc Py_RunMain + 3568 81 python
0x00000001045720a8 pymain_main + 1244 82 python
0x00000001043bc1e0 main + 56 83 libdyld.dylib
0x0000000192848f54 start + 4 ) libc++abi.dylib: 以 NSException 类型的未捕获异常终止 zsh: abort python
我无法修复此错误,请帮助我。非常感谢。
android-studio - Android Studio 的 MBP13 2016 慢吗
配备 16GB RAM(大苏尔)的 MacBook Pro 13 2016 i5 2.9。Android Studio ArcticFox patch3 当我编写/编辑/滚动(尤其是滚动)时,编辑器会滞后(并非总是如此,但经常如此)。我试过: 1.将 Xmx 增加到 4GB 2.重新安装操作系统和 Android Studio 3.使用 Macs Fan 设置恒定 RPM 值
我不知道该怎么办。
我的 MacBook 对 Android Studio 来说太慢了吗?知道为什么会发生这种情况,我该怎么办?
flutter - 寻找cocoapods升级macbook的解决方案
我是 Flutter 的新手,遇到将 cocoapods 版本从 1.8.4 更新到最新版本但没有获得更新版本的问题。 https://www.screencast.com/t/rbdPQSCLWf 我尝试过:$ sudo gem install cocoapods 但它给出的错误是:extconf failed, exit code 1 我也尝试过更新,但没有。它也给出了许可错误。它给出以下类型的错误:
错误:安装 cocoapods 时出错:错误:无法构建 gem 原生扩展。
您必须先安装开发工具。然后 extconf 失败,退出代码 1
执行 gem ... (Gem::FilePermissionError) 您没有 /Library/Ruby/Gems/2.6.0 目录的写入权限。admin@furqansmacimac3 ~ % gem install nokogiri --use-system-libraries 错误:执行 gem ... (OptionParser::InvalidOption) 无效选项:--use-system-libraries
请帮助我解决此错误并将 cocoapods 更新到 1.9.0 或更高版本。
https://www.screencast.com/t/FgmVnttZCz https://www.screencast.com/t/nnXroTQJ
next.js - NextJs with ChakraUI v1.7.5 extendTheme - 如何修复“无法读取未定义的属性(读取'useSystemColorMode')”
使用extendTheme 时,我的Macbook 上的"Cannot read properties of undefined (reading 'useSystemColorMode')"
NextJs 和chakra-ui v1.7.5 出现错误
这是我的package.json文件
src/theme/index.js。已经尝试传播 ...config,但问题仍然存在。
页面/_app.js
我已经按照这里给出的所有说明 https://chakra-ui.com/guides/getting-started/nextjs-guide但仍然无法解决问题。希望有人可以在这方面提供帮助。谢谢!
javascript - 我们如何检测 Macbook Pro 触控栏按键的“keyDown/keyPress”事件?
我最近遇到了在 Esc 按键上关闭 Modal 的要求(508 合规性)。然后我意识到我在我的 react 组件上编写的 onKeyDown 处理程序没有按预期工作。从我的 macbook pro 的触摸栏中单击 Escape 键时不会触发该事件。有没有人经历过类似的问题?如果是,是否有解决方法?
monitor - AOC C24G1 Curved Monitor not detected on MacBook
AOC C24G1 Curved Monitor not detected on MacBook. Tried installing the DisplayLink Driver, even then the display is not detected. Any suggestion will be high appreciated.
react-native - Macbook M1 的 React Native NPM 启动错误
启动 react native 后需要帮助修复此错误:
无法构造变压器:错误:错误:0308010C:数字信封例程::在稳定哈希(/用户/ellisotoo/ReactNative/RNProject/node_modules/metro-cache/src/stableHash.js:19:8) 在 Object.getCacheKey (/Users/ellisotoo/ReactNative/RNProject/node_modules/metro-transform-worker/src/index. js:593:7) 在 getTransformCacheKey (/Users/ellisotoo/ReactNative/RNProject/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:24:19) 在新 Transformer (/Users/ellisotoo/ReactNative/RNProject/node_modules/metro /src/DeltaBundler/Transformer.js:48:9) 在 /Users/ellisotoo/ReactNative/RNProject/node_modules/metro/src/Bundler.js:22:29 在 processTicksAndRejections (node:internal/process/task_queues:96:5 ) { opensslErrorStack: ['error:03000086:数字信封例程::初始化错误'],库:'数字信封例程',原因:'不支持',代码:'ERR_OSSL_EVP_UNSUPPORTED'}