Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在MacOS 11.1上使用pyenv安装带有共享库的Python构建_Python_Macos_Macos Big Sur_Pyenv_Apple M1 - Fatal编程技术网

无法在MacOS 11.1上使用pyenv安装带有共享库的Python构建

无法在MacOS 11.1上使用pyenv安装带有共享库的Python构建,python,macos,macos-big-sur,pyenv,apple-m1,Python,Macos,Macos Big Sur,Pyenv,Apple M1,我在尝试安装启用共享库的Python 3.8.6时遇到错误。我正在M1 Macbook Pro上使用PyEnv 1.2.23 特别是,运行: $ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.8.6 返回错误消息: python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloadi

我在尝试安装启用共享库的Python 3.8.6时遇到错误。我正在M1 Macbook Pro上使用PyEnv 1.2.23

特别是,运行:

$ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.8.6
返回错误消息:

python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.6.tar.xz...
-> https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz
Installing Python-3.8.6...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 11.1 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/python-build.20210309124942.97911
Results logged to /var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/python-build.20210309124942.97911.log

Last 10 log lines:
checking size of _Bool... 1
checking size of off_t... 8
checking whether to enable large file support... no
checking size of time_t... 8
checking for pthread_t... yes
checking size of pthread_t... 8
checking size of pthread_key_t... 8
checking whether pthread_key_t is compatible with int... no
configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found. Stop.
我也试过:

$ arch -x86_64 env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.8.6
我得到了相同的输出

我也试过:

$ brew install zlib
$ export LDFLAGS="-L/usr/local/opt/zlib/lib"
$ export CPPFLAGS="-I/usr/local/opt/zlib/include
唉,没用


有什么想法吗?谢谢~

M1支持直到3.9.1才添加到Python中。你需要升级