5

I am trying to install pyflink via pip3 install apache-flink.

and i get :

Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 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" and platform_system != "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.8" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version >= "3.9"' don't match your environment Collecting setuptools

× Encountered error while trying to install 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 subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

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

Sudip Adhikari
  • 157
  • 2
  • 12
  • Kindly edit your post and fix the formatting. You can safely remove the lines beginning with `Ignoring numpy:` those only list platforms/versions you don't have. – Lorinczy Zsigmond Feb 16 '22 at 09:21

1 Answers1

2

I also struggled to get PyFlink 1.16.0 running on my Mac with M1 ARM processor. The problem is that PyFlink 1.16 works under osx-86 but not under osx-arm64 and my default environment was osx-arm64.

But if I set that when creating my conda environment it works:

Proper install

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

Run test 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

Output of basic_operations.py

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

Supposedly Flink 1.16.1 should run natively on ARM processor.

Sami Badawi
  • 977
  • 1
  • 10
  • 22