[solution] psutil missing in build for macOS Intel, ptx2pdf version 3.0.39

Open Beginner friendly
#1,254 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with the packaging configuration for the macOS PTXprint.app build and inspect the import path through ptxprint/multiprint.py, where the failure occurs. Check how PyInstaller handles psutil and add the required packaging entry if needed. Done means rebuilding the Intel macOS app and launching it without the ModuleNotFoundError.

Written by the indexing model from the issue text.

Description

PROBLEM:

mm@MMs-iMac ptx2pdf-3.0.39 % ./dist/PTXprint.app/Contents/MacOS/PTXprint-app 
Adding .../_PTXprint
Traceback (most recent call last):
  File "ptxprint.py", line 20, in <module>
  File "ptxprint/main.py", line 533, in main
  File "pyimod02_importers.py", line 457, in exec_module
  File "ptxprint/gtkview.py", line 58, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "ptxprint/multiprint.py", line 10, in <module>
ModuleNotFoundError: No module named 'psutil'
[PYI-10615:ERROR] Failed to execute script 'ptxprint' due to unhandled exception: No module named 'psutil'
[PYI-10615:ERROR] Traceback:
Traceback (most recent call last):
  File "ptxprint.py", line 20, in <module>
  File "ptxprint/main.py", line 533, in main
  File "pyimod02_importers.py", line 457, in exec_module
  File "ptxprint/gtkview.py", line 58, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "ptxprint/multiprint.py", line 10, in <module>
ModuleNotFoundError: No module named 'psutil'

SOLUTION:

% python3 -m venv _venv
% source ./_venv/bin/activate

% python3 -m pip install psutil

Collecting psutil
  Downloading psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl.metadata (22 kB)
Downloading psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl (129 kB)
Installing collected packages: psutil
Successfully installed psutil-7.2.2

[notice] A new release of pip is available: 26.1.2 -> 26.2.1
[notice] To update, run: pip install --upgrade pip

% python3 -c "import psutil; print(psutil.__version__)"
7.2.2

Or maybe missing in pyinstaller ? (Not tested)

hiddenimports=[
    "psutil",
]
Dominant language
Python
Stars
33
Forks
15
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sillsdev/ptx2pdf

All issues in sillsdev/ptx2pdf

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.