Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

tensorflow - Can I have opencv-python installed on a python virtual environment with tensorflow_macos?

I am on macos with apple M1 silicon chip (arm64) and I created a virtual environment with native python3.8 to be able to have Tensorflow in it (I used https://github.com/apple/tensorflow_macos). I would like to have opencv-python installed in this same environment but I can't install it with pip install opencv-python (fails with compilation error). I tried to find a way to build it from source but did not find something useful.

PS: I do not want to install opencv-python with Rosetta2 as I would like to use it alongside Tensorflow.

PS2: With PyTorch, I succeded to install it in the virtual environment thanks to pip install --force-reinstall --no-dependencies torch-1.8.0a0-cp38-cp38-macosx_11_0_arm64.whl, would be awesome to have the same solution :D

Thanks for your help!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...