我正在尝试运行一个需要python〈3.7的旧应用程序,我目前使用的是python 3.9,需要使用多个版本的python。
我已经安装了pyenv-virtualenv
和pyenv
,并且成功安装了python 3.7.13。但是,当我尝试安装3.6.* 时,我得到了以下信息:
$ pyenv install 3.6.13
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.6.13.tar.xz...
-> https://www.python.org/ftp/python/3.6.13/Python-3.6.13.tar.xz
Installing Python-3.6.13...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 12.3.1 using python-build 2.2.5-11-gf0f2cdd1)
Inspect or clean up the working tree at /var/folders/r5/xz73mp557w30h289rr6trb800000gp/T/python-build.20220413143259.33773
Results logged to /var/folders/r5/xz73mp557w30h289rr6trb800000gp/T/python-build.20220413143259.33773.log
Last 10 log lines:
checking for --with-cxx-main=<compiler>... no
checking for clang++... no
configure:
By default, distutils will build C++ extension modules with "clang++".
If this is not intended, then set CXX on the configure command line.
checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report
make: *** No targets specified and no makefile found. Stop.
有办法解决这个问题吗?我看过了,似乎Mac M1不允许安装3.6。*
2条答案
按热度按时间xdnvmnnf1#
从GitHub问题复制。
我使用下面的设置在运行Monterey的Apple M1 MacBook Pro上成功安装了Python
3.6
。这里可能有一些东西可以删除/优化...但它对我很有效!注意,生成成功,但给出以下警告
运行
pyenv versions
显示3.6.15
可以被系统正常使用zbsbpyhn2#
添加到dontirun的答案。
您可能会收到如下错误。
这是因为您已经安装了另一个openssl版本,该版本高于1.0,可能是3。您可以按照下面突出显示的内容更新命令。