如何在自制软件中安装特定版本的公式?例如,postgresql-8.4.4而不是最新的9.0.
通过 pyenv 安装的 Python 版本无法导入tkinter:
? python
Python 3.8.1 (default, Feb 29 2020, 11:45:59)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/factor/.pyenv/versions/3.8.1/lib/python3.8/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
>>>
Run Code Online (Sandbox Code Playgroud)
或者您可能会收到有关标头版本与二进制文件不匹配的消息:
DEPRECATION WARNING: The system version of Tk is deprecated …Run Code Online (Sandbox Code Playgroud) 我想在我的mac osx上更新命令行工具.
~ softwareupdate --list
Software Update Tool
Copyright 2002-2015 Apple Inc.
Finding available software
Software Update found the following new or updated software:
* Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2
Command Line Tools (macOS El Capitan version 10.11) for Xcode (8.2), 150374K [recommended]
* iTunesX-12.5.5
iTunes (12.5.5), 263476K [recommended]
Run Code Online (Sandbox Code Playgroud)
但是当我运行update命令时,我收到此错误:
softwareupdate -i Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2
zsh: number expected
Run Code Online (Sandbox Code Playgroud)
这也不起作用:
softwareupdate -i Command Line Tools
Software Update Tool
Copyright …Run Code Online (Sandbox Code Playgroud) 尝试使用 pyenv 2.1.0(来自自制程序)在 MacOS 11.6 (Intel) 上安装 Python 3.10.0 失败,并显示:
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.0.tar.xz...
-> https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz
Installing Python-3.10.0...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 11.6 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/rk/_qysk9hs40qcq14h44l57wch0000gn/T/python-build.20211006114013.40649
Results logged to /var/folders/rk/_qysk9hs40qcq14h44l57wch0000gn/T/python-build.20211006114013.40649.log
Last 10 log lines:
checking MACHDEP... "darwin"
checking for gcc... clang
checking whether the C compiler works... …Run Code Online (Sandbox Code Playgroud) 这让我很困惑,我不知道这意味着什么。我的计算机(MacOS)上安装了 3.6.4,但它不想工作。
我想不出任何解决方案,也不知道该怎么办。