apple-m1

Live OpenCV window capture (screenshot) on macOS (Darwin) using Python

Live OpenCV window capture (screenshot) on macOS (Darwin) using Python Question: I am following a tutorial on Open CV and trying to rewrite the following code: https://github.com/learncodebygaming/opencv_tutorials/tree/master/005_real_time (specifically, the windowcapture.py file) This file uses win32gui, win32ui, win32con to capture a given open window by window name and take a screenshot of it for cv2 processing …

Total answers: 1

Weasyprint on MacOS M1: cannot use unpack() on <cdata 'char *' NULL>

Weasyprint on MacOS M1: cannot use unpack() on <cdata 'char *' NULL> Question: I’ve been trying to save some HTML into PDF using Weasyprint, but I get the error message cannot use unpack() on <cdata ‘char *’ NULL> I believe this is a MacOS M1-related issue, given that the same code has been tested on …

Total answers: 1

lxml fails to import, with error `symbol not found in flat namespace '_xsltDocDefaultLoader'`

lxml fails to import, with error `symbol not found in flat namespace '_xsltDocDefaultLoader'` Question: With the code: from lxml.etree import HTML, XML I get the traceback: Traceback (most recent call last): File "/Users/username/code/project/lxml-test.py", line 3, in <module> from lxml.etree import HTML, XML ImportError: dlopen(/Users/username/.virtualenvs/project-venv/lib/python3.11/site-packages/lxml/etree.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace ‘_xsltDocDefaultLoader’ I’m on a …

Total answers: 2

Installing ssdeep package from PyPi on M1 Macbook

Installing ssdeep package from PyPi on M1 Macbook Question: The Goal Install ssdeep PyPi package on a M1 Macbook Pro. The Problem When I run pip install ssdeep I get 2 errors The first error is caused because fuzzy.h cannot be found. warnings.warn( running egg_info creating /private/var/folders/0f/4c82tsj50n10zqq89fndcslc0000gn/T/pip-pip-egg-info-ai0atrdv/ssdeep.egg-info writing /private/var/folders/0f/4c82tsj50n10zqq89fndcslc0000gn/T/pip-pip-egg-info-ai0atrdv/ssdeep.egg-info/PKG-INFO writing dependency_links to /private/var/folders/0f/4c82tsj50n10zqq89fndcslc0000gn/T/pip-pip-egg-info-ai0atrdv/ssdeep.egg-info/dependency_links.txt writing requirements …

Total answers: 3

M1 Mac – PyCharm – Unable to run on arm64

M1 Mac – PyCharm – Unable to run on arm64 Question: It appears I’m unable to run the arm64 architecture in PyCharm and I don’t understand why. I would really like to learn what I’m doing wrong. Specs I’m on a 2021 M1 MacBook Pro with macOs Monterey 12.6.2 PyCharm 2022.3.2 (Community Edition) Runtime version: …

Total answers: 1

Install Tensorflow in MacOs M1

Install Tensorflow in MacOs M1 Question: I am struggling to install tensorflow on MacOS Monterey 12.5.1 with M1 Chip pip3 install tensorflow-macos pip3 install tensorflow-metal I keep getting this error: ERROR: Could not find a version that satisfies the requirement python (from versions: none) I tried venv, I tried miniconda, anaconda, still same issue. How …

Total answers: 2

Enabling voice control in AppleScript Ventura

Enabling voice control in AppleScript Ventura Question: I am trying to use AppleScript to press the switch for activating voice control in macOS Ventura. The first switch in this image where it toggles voice control: I tried the following apple script: do shell script "open -b com.apple.systempreferences " & ¬ "/System/Library/PreferencePanes/UniversalAccessPref.prefPane" tell application "System Events" …

Total answers: 3

Is LightGBM available for Mac M1?

Is LightGBM available for Mac M1? Question: My goal is to learn a notebook. It has recall 97% while I am struggling with F1 Score ‘Attrited Customer’ 77.9%. The problem is the notebook uses LightGBM. I am unable to install LightGBM. What I’ve tried: pip install lightgbm -> it throws error python setup.py egg_info did …

Total answers: 1

Web3 python crypto cypher issue on M1 Mac

Web3 python crypto cypher issue on M1 Mac Question: When I try to build a blockchain transaction using Web3 on python, I’m getting an error that is apparently because I’m using an Apple Silicon computer (2020 M1 MacBook Pro). I’m following a popular Solidity, Blockchain, and Smart Contract course on YouTube and I’m unable to …

Total answers: 2