apple-m1

arch x86_64 and arm64e is available but python3 is saying incompatible architecture on Mac M1

arch x86_64 and arm64e is available but python3 is saying incompatible architecture on Mac M1 Question: I am trying to run this reading-text-in-the-wild on Mac M1. When I attempt to run this code python3 make_keras_charnet_model.py I get the error Using Theano backend. Traceback (most recent call last): File "/Users/name/miniforge3/envs/ocr_env/lib/python3.8/site-packages/theano/gof/cutils.py", line 305, in <module> from cutils_ext.cutils_ext …

Total answers: 7

"brew install python" installs 3.9. Why not 3.10?

"brew install python" installs 3.9. Why not 3.10? Question: My understanding is that "brew install python" installs the latest version of python. Why isn’t it pulling 3.10? 3.10 is marked as a stable release. I can install 3.10 with "brew install [email protected] just fine and can update my PATH so that python and pip point …

Total answers: 2

How can I create a script to switch between my ARM conda and x86 conda?

How can I create a script to switch between my ARM conda and x86 conda? Question: I am on an apple silicon M1 MacBook Pro. I would like to have a native ARM python environment, and an environment that runs on x86 architecture with rosetta 2. I have installed two mini forge distributions, both in …

Total answers: 1

MacOS M1 system is detected as ARM by Python package even though I'm using Rosetta

MacOS M1 system is detected as ARM by Python package even though I'm using Rosetta Question: I’m on a Macbook with M1 (Apple ARM architecture) and I’ve tried running the following Python code using the layoutparser library, which indirectly uses pycocotools: import layoutparser as lp lp.Detectron2LayoutModel() And I’ve received the error: […] ImportError: dlopen([…]/.venv/lib/python3.9/site-packages/pycocotools/_mask.cpython-39-darwin.so, 0x0002): …

Total answers: 1

Why Python native on M1 Max is greatly slower than Python on old Intel i5?

Why is numpy native on M1 Max greatly slower than on old Intel i5? Question: I just got my new MacBook Pro with M1 Max chip and am setting up Python. I’ve tried several combinational settings to test speed – now I’m quite confused. First put my questions here: Why python run natively on M1 …

Total answers: 4

M1 Mac – GDAL Wrong Architecture Error [Django]

M1 Mac – GDAL Wrong Architecture Error [Django] Question: I’m trying to get a django project up and running, which depends on GDAL library. I’m working on a M1 based mac. Following the instructions on official Django docs, I’ve installed the necessary packages via brew $ brew install postgresql $ brew install postgis $ brew …

Total answers: 5

How to fix this import matplotlib problem in M1 Mac?

How to fix this import matplotlib problem in M1 Mac? Question: I bought Mac M1, and now setting up my python environment. I installed Rosetta 2, and set my Terminal as Rosetta 2 I installed pyenv with brew installed Sqlite3 with brew installed python 3.9.4 with pyenv (set as global) installed visual studio code with …

Total answers: 3

How to run sklearn library with native tensorflow on m1 mac

How to run sklearn library with native tensorflow on m1 mac Question: I have installed TensorFlow using a virtual environment running python 3.8 as described by Apple. This should theoretically run natively and utilise the GPU. I tried installing TensorFlow using miniforge last time and it was not able to use the GPU as miniforge …

Total answers: 1

Cannot use keras models on Mac M1 with BigSur

Cannot use keras models on Mac M1 with BigSur Question: I am trying to use Sequential model from keras of tensorflow. When I am executing following statement: model.fit(x_train, y_train, epochs=20, verbose=True, validation_data=(x_dev, y_dev), batch_size=10) I am getting following errors: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2) W tensorflow/core/platform/profile_utils/cpu_utils.cc:126] Failed to …

Total answers: 3

Python/pip process are killed in virtualenv (Apple M1 chip)

Python/pip process are killed in virtualenv (Apple M1 chip) Question: When I execute pip or python in MacBook M1 chip virtualenv, the process always terminates immediately with message like: [1] 29116 killed pip or [1] 29141 killed python Python and pip in M1 MacBook native environment run fine. Only in the virtualenv they don’t work. …

Total answers: 3