繁体   English   中英

MacOS M1安装PyFlink报Numpy错误

[英]Installing PyFlink and Numpy Error on MacOS M1

我正在尝试通过pip3 install apache-flink

我得到:

Installing build dependencies... error error: subprocess-exited-with-error × pip 安装构建依赖项的子进程未成功运行。 │ 退出代码:1 ╰─> [4479 lines of output] Ignoring numpy: markers 'python_version == "3.6" and platform_system:= "AIX"' don't match your environment Ignoring numpy.markers 'python_version == "3: 7" 和 platform_system.= "AIX"' 与您的环境不匹配忽略 numpy:标记'python_version == "3.6" 和 platform_system == "AIX"' 与您的环境不匹配忽略 numpy:标记'python_version == " 3.7" 和 platform_system == "AIX"' 与您的环境不匹配 Ignoring numpy: markers 'python_version == "3.8" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version >= " 3.9"' 与您的环境不匹配 收集设置工具

× 尝试安装 package 时遇到错误。╰─> numpy

 note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip 安装构建依赖项的子进程未成功运行。 │ 退出码:1 ╰─> output见上。

python -V = Python 3.8.2 pip -V = pip 22.0.3 来自/Users/sudipadh/Desktop/upwork/m1neral/env/lib/python3.8/site-packages/pip (8)python 3.8

我还努力让 PyFlink 1.16.0 在配备 M1 ARM 处理器的 Mac 上运行。 问题是 PyFlink 1.16 在 osx-86 下工作但在 osx-arm64 下不工作,我的默认环境是 osx-arm64。

但是,如果我在创建我的 conda 环境时设置它,它就会工作:

正确安装

CONDA_SUBDIR=osx-64 conda create -n pf116_conda38 python=3.8
conda activate pf116_conda38
pip install apache-flink

运行测试 basic_operations.py

cd ~/Document/GitHub
git clone https://github.com/apache/flink.git
python ~/Documents/GitHub/flink/flink-python/pyflink/examples/datastream/basic_operations.py

basic_operations.py 的 Output

(1, '{"name": "Flink", "tel": 124, "addr": {"country": "Germany", "city": "Berlin"}}')
(2, '{"name": "hello", "tel": 136, "addr": {"country": "China", "city": "Shanghai"}}')

据说 Flink 1.16.1 应该在 ARM 处理器上本地运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM