macos

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

os.path.abspath() returning different results for same file

os.path.abspath() returning different results for same file Question: I am getting a different result for a file in os.path.abspath() when it is run in a unit test versus when it is run in the code being tested: The code I am testing contains: abspath = os.path.abspath(filepath) My test for the code copies the file into …

Total answers: 1

Stray Python processes in memory on MacOS 11.6

Stray Python processes in memory on MacOS 11.6 Question: I have a Macbook Air M1 from 2020 with MacOS Big Sur (11.6). I regularly use Python with Jupyter notebooks, or from the terminal. To install Python, I use Anaconda3 for MacOS Apple Silicon. I often use Python from different conda environments. After I close all …

Total answers: 1

Python Module not found ONLY when .py file is on desktop

Python Module not found ONLY when .py file is on desktop Question: Only for a .py file that is saved on my Desktop, importing some modules (like pandas) fail due to Module not found from an import that happens within the module. This behaviour doesn’t happen when the file is saved to a different location. …

Total answers: 2

Can I deploy TKinter apps to MacOS?

Can I deploy TKinter apps to MacOS? Question: I want to develop a Windows/macOS app on my Windows machine, I aim to upload the executable file and upload it on the internet so that people with macOS can run it just like on windows. Is that possible? I tried searching on this topic on the …

Total answers: 1

M1 trying to run SparkSession, but having RuntimeError: Java gateway process exited before sending its port number

M1 trying to run SparkSession, but having RuntimeError: Java gateway process exited before sending its port number Question: I am trying to run a simple command spark = SparkSession.builder.appName("Basics").getOrCreate() in my M1 Mac, Monterey 12.6.2, but it throws an error: The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for …

Total answers: 1

Anyone know why my .bash_profile is adding "export pyenv" everytime i open terminal?

Anyone know why my .bash_profile is adding "export pyenv" everytime i open terminal? Question: I had an issue where vscode was loading terminal in a blank screen and i got an error message in vscode saying "Unable to resolve your shell environment". So i decided to check my .bash_profile file and was suprised to find …

Total answers: 1

Anaconda Installation Failed on macOS Ventura

Anaconda Installation Failed on macOS Ventura Question: I am trying to install Anaconda on my new MacBook which has Ventura 13.1 installed. I am installing only for myself and the installation fails. Can someone please help? Edit 1 I have followed this link but I do not see that. Edit 2 As it was a …

Total answers: 2

ERROR: Could not find a version that satisfies the requirement torch==1.2.0(from versions: none) ERROR:No matching distribution found for torch==1.2.0

ERROR: Could not find a version that satisfies the requirement torch==1.2.0(from versions: none) ERROR:No matching distribution found for torch==1.2.0 Question: I’m trying to install yolov5 on my Mac M1 using the followwing commands: git clone https://github.com/ultralytics/yolov5.git then: cd yolov5 But when I tried to install the requirmets from the requirments.txt file with below command: pip …

Total answers: 1

Matplotlib's show function triggering unwanted output

Matplotlib's show function triggering unwanted output Question: Whenever I have any Python code executed via Python v3.10.4 with or without debugging in Visual Studio Code v1.74.2, I get output looking like the following in the Debug Console window in addition to the normal output of the code. Otherwise, all of my Python programs work correctly …

Total answers: 3