Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install Pillow on Ubuntu #7980

Closed
iconoclasthero opened this issue Apr 15, 2024 · 13 comments
Closed

Can't install Pillow on Ubuntu #7980

iconoclasthero opened this issue Apr 15, 2024 · 13 comments

Comments

@iconoclasthero
Copy link

iconoclasthero commented Apr 15, 2024

So I guessed and it did not work. Do you have installation instructions elsewhere as the ones linked from the README.md have no information and thus I cannot get started with your project.

$ apt install python3-pillow; pipx install pillow
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'python3-pil' instead of 'python3-pillow'
python3-pil is already the newest version (10.2.0-1).
python3-pil set to manually installed.
The following package was automatically installed and is no longer required:
  libgcrypt20:i386
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 144 not upgraded.

No apps associated with package pillow or its dependencies. If you are attempting to install a library, pipx should
not be used. Consider using pip or a similar tool instead.
@iconoclasthero
Copy link
Author

@aclark4life
Copy link
Member

@iconoclasthero
Copy link
Author

iconoclasthero commented Apr 15, 2024

Yeah I see that now.
I don't read fine print well.
It would be great if it just went straight there...that's my suggestion. (People are lazy and stupid so make things as simple as possible...)

Sorry for the waste of time.

@iconoclasthero
Copy link
Author

Hey, it's not showing up in pipx and i can't just install things system-wide in Ubuntu so I'm not sure where it is...

$ pipx install Pillow pillow

No apps associated with package pillow or its dependencies. If you are attempting to install a library, pipx should
not be used. Consider using pip or a similar tool instead.

@aclark4life
Copy link
Member

No prob! It has been discussed. pipx install pillow should work … if not, paste the traceback here.

@aclark4life
Copy link
Member

aclark4life commented Apr 15, 2024

Actually, no. Use pip install pillow (I get the same result as you.)

alexclarks-Air:~:% pipx install pillow
⚠️ Found a space in the home path. We heavily discourage this, due to multiple incompatibilities. Please check our docs for more information on this, as well
    as some pointers on how to migrate to a different home path.

No apps associated with package pillow or its dependencies. If you are attempting to install a library, pipx should not be used. Consider using pip or a
similar tool instead.

@iconoclasthero
Copy link
Author

Yeah, this is where ubuntu-based linux and python run into problems...you can't use pipx for libraries (i just found this out much to my frustration last week) and you can't do what you suggested either:

$ pip install pillow
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

This is on Rhino Linux derived from Noble:

$ python3 --version; pip --version; pipx --version; neofetch~  --off
Python 3.12.2
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)
1.4.3
 
Rhino Linux rolling release based on 
OS: Ubuntu Noble Numbat (development branch) x86_64 
Kernel: Linux 6.8.4-060804-generic 
Shell: bash 5.2.21 

@iconoclasthero
Copy link
Author

Oh and if i want to install it system wide with apt it needs to be in a repo. usually that's done with e.g., $ apt install python3-pillow

@iconoclasthero
Copy link
Author

iconoclasthero commented Apr 15, 2024

I have it installed in an venv but I really don't know what to do with it to make it so that beets fetchart plugin can use it—the only thing I want to do today. I have imagemagick and figured it would be great to have something else ... and since this was listed as the first option (i.e., ahead of imagemagick), i said, "why not, I've got a couple extra minutes," but I keep running into this problem with python and just give up.

I had some discussion on #python3 irc about this issue last week (it was a different library, it doesn't matter which) that were ... contentious about how python3 interacts with users in this environment so I don't know what the answer is but I can't deal with the resultant frustration...

@iconoclasthero iconoclasthero changed the title "Installation" section of documentation missing Installation instructions not applicable in a system-managed python3 environment Apr 15, 2024
@iconoclasthero iconoclasthero changed the title Installation instructions not applicable in a system-managed python3 environment Installation instructions not applicable in an externally-managed python3 environment Apr 15, 2024
@iconoclasthero iconoclasthero changed the title Installation instructions not applicable in an externally-managed python3 environment Installation instructions not applicable in an externally-managed python3 environment (e.g., ubuntu) Apr 15, 2024
@iconoclasthero iconoclasthero changed the title Installation instructions not applicable in an externally-managed python3 environment (e.g., ubuntu) Installation instructions apparently inapplicable in an externally-managed python3 environment (e.g., ubuntu) Apr 15, 2024
@aclark4life aclark4life changed the title Installation instructions apparently inapplicable in an externally-managed python3 environment (e.g., ubuntu) Can't install Pillow on Ubuntu Apr 15, 2024
@aclark4life
Copy link
Member

@radarhere
Copy link
Member

radarhere commented Apr 15, 2024

I really don't know what to do with it to make it so that beets fetchart plugin can use it

What command are you using to run the plugin?

Edit: From https://github.com/beetbox/beets/blob/3adca9769b68f93bd2d80983125a10ab5e299400/beet#L1, I would conclude that beets uses python.

If you are really at your wits' end, I think python -m pip install --break-system-packages Pillow will solve your problem, but be aware this may not be ideal.

@radarhere radarhere added Installation Usually a problem with … Linux labels Apr 15, 2024
@radarhere
Copy link
Member

It would be great if it just went straight there

#7981 has updated the README to link to https://pillow.readthedocs.io/en/latest/installation/basic-installation.html

Copy link

Closing this issue as no feedback has been received.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants