WGSExtract / WGSExtract.github.io

WGS Extract WWW home
https://WGSExtract.github.io/
GNU General Public License v3.0
34 stars 5 forks source link

MacOS X install, fails to install python Pillow (PIL) library "ModuleNotFoundError: No module named 'PIL'" #18

Closed arober11 closed 1 year ago

arober11 commented 1 year ago

A manual install fixes the issue, eg.

python wgsextract.py Traceback (most recent call last): File "/Users/ar/Downloads/WGSExtract/programs/wgsextract/wgsextract.py", line 15, in from PIL import ImageTk, Image ModuleNotFoundError: No module named 'PIL'

$ port search pillow py-Pillow @9.5.0 (python, devel) Python Imaging Library (fork)

py27-Pillow @6.2.1_2 (python, devel) Python Imaging Library (fork)

py35-Pillow @6.2.1_2 (python, devel) Python Imaging Library (fork)

py36-Pillow @8.4.0_1 (python, devel) Python Imaging Library (fork)

py37-Pillow @9.5.0 (python, devel) Python Imaging Library (fork)

py38-Pillow @9.5.0 (python, devel) Python Imaging Library (fork)

py39-Pillow @9.5.0 (python, devel) Python Imaging Library (fork)

py310-Pillow @9.5.0 (python, devel) Python Imaging Library (fork)

py311-Pillow @9.5.0 (python, devel) Python Imaging Library (fork)

Found 9 ports.

$ sudo port install py311-Pillow Password: ---> Computing dependencies for py311-Pillow ---> Fetching archive for py311-Pillow ---> Attempting to fetch py311-Pillow-9.5.0_0.darwin_17.x86_64.tbz2 from http://mse.uk.packages.macports.org/py311-Pillow ---> Attempting to fetch py311-Pillow-9.5.0_0.darwin_17.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/py311-Pillow ---> Installing py311-Pillow @9.5.0_0 ---> Activating py311-Pillow @9.5.0_0 ---> Cleaning py311-Pillow ---> Scanning binaries for linking errors ---> No broken files found.
---> No broken ports found.

$ python wgsextract.py This little window shows what WGSExtract is doing in the background while it runs tasks that the user initiated. This can be a help if you experience any errors. The window can be minimized if there are no errors. $

RandyHarr commented 1 year ago

Very odd. I quickly reconfirmed WGS Extract installs fine on a MacOS Ventura 13.4.1 M1 silicon machine. Do you have a CPU Arch and MacOS version that it did not work on? Did you modify the scripts at all?

We install Python from the native installer and PIP modules with that installation; not via Macports. Sudo is generally only required for the Apple Xcode and MacPorts installation. All PIP library elements are in a single list in the zinstall_common.sh script called by the Installer. Pillow is just one of many there. Here is the report from the installation run we just did. Pillow is the first entry after PIP is installed.

Obtaining dependency information for Pillow from https://files.pythonhosted.org/packages/b7/ad/71982d18fd28ed1f93c31b8648f980ebdbdbcf7d8c9c9b4af59290914ce9/Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl.metadata Downloading Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl.metadata (9.5 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done'

arober11 commented 1 year ago

HiAttempted to install on a decade old Intel MacBook, running 10.13, as had the free space, on its SSD, pretty much a clean machine, if you ignore toys like Caffeine, XCode, MacPorts, and Homebrew, along with the GNU versions of toys like sed, bc, a JRE, and Python 3. Macports, then Homebrew's directories are in the PATH. The installer did it's thing for a while, couldn't see any error messages, but when i attempted to invoke the program, no PIL. Could be an environment thing, if a copy was installed by the installer, though took the quickest way to resolve.Regards, AndrewSent from my iPadOn 27 Aug 2023, at 18:58, Randy H @.***> wrote: Very odd. I quickly reconfirmed WGS Extract installs fine on a MacOS Ventura 13.4.1 M1 silicon machine. Do you have a CPU Arch and MacOS version that it did not work on? Did you modify the scripts at all? We install Python from the native installer and PIP modules with that installation; not via Macports. Sudo is generally only required for the Apple Xcode and MacPorts installation. All PIP library elements are in a single list in the zinstall_common.sh script called by the Installer. Pillow is just one of many there. Here is the report from the installation run we just did. Pillow is the first entry after PIP is installed. Obtaining dependency information for Pillow from https://files.pythonhosted.org/packages/b7/ad/71982d18fd28ed1f93c31b8648f980ebdbdbcf7d8c9c9b4af59290914ce9/Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl.metadata Downloading Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl.metadata (9.5 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done'

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

RandyHarr commented 1 year ago

Macports dropped support for all MacOS X except 15. So we no longer test that. If our installer sees a valid Python3 inthe users or systems area, it will not try to reinstall it. Tthe pip3 path is hard coded in to WGSE to avoid any other version that may be installed. But pip must have worked as expected if the other libraries installed. It is possible the pip pillow (outside macports) would not install on 10.13 anymore. But the macports precompiled version would.

I am going to close the comment as the setup is outside our supported configuration. But keep it in mind while doing future updates. The hope is to become a Conda module if we can get them work on Windows with bioinformatic tools (even if we have to supply).