相关疑难解决方法(0)

如何使用Homebrew在Mac上安装Python 2和3?

我需要能够在Python 2和3之间来回切换.我如何使用Homebrew做到这一点,因为我不想弄乱路径并遇到麻烦.现在我通过Homebrew安装了2.7.

python homebrew

137
推荐指数
5
解决办法
7万
查看次数

无法在 MacOS 上使用 pyenv Python 安装 tkinter

通过 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)

python macos tkinter pyenv

42
推荐指数
3
解决办法
1万
查看次数

OSX 上“arch”的意外输出(使用 Mac M1 安装弹性豆)

尝试在 MacBook Air M1 上安装弹性豆时,使用以下命令:

% ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer

如此处所示的指南:https : //github.com/aws/aws-elastic-beanstalk-cli-setup

我收到以下错误:


5. Installing Python 3.7.2. This step may take a few minutes
************************************************************
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew

BUILD FAILED (OS X 11.1 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/2v/7tdwpjsd3jzdw75jmp2n5trh0000gn/T/python-build.20201225141032.70517
Results logged to /var/folders/2v/7tdwpjsd3jzdw75jmp2n5trh0000gn/T/python-build.20201225141032.70517.log

Last 10 log lines:
checking size of _Bool... 1
checking size of off_t... 8 …
Run Code Online (Sandbox Code Playgroud)

python macos arm amazon-web-services amazon-elastic-beanstalk

11
推荐指数
5
解决办法
9168
查看次数