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

check for libjpeg-dev before installing pillow #23

Closed
henning opened this issue Oct 14, 2013 · 15 comments
Closed

check for libjpeg-dev before installing pillow #23

henning opened this issue Oct 14, 2013 · 15 comments

Comments

@henning
Copy link
Contributor

henning commented Oct 14, 2013

I ran into the situation that the installer fails at the end when Pillow is not compiled / installed with libjpeg support.

There are two things I'd like to propose that could be done to help users getting along wih this:

  • check if libjpeg is there before installing pillow - because we already know it will fail otherwise
  • if the former is not possible or hard to do (it might be hard to detect properly if the dev files are there on all platforms you might want to support, but it might also be possible, I'm not a C lib expert) - there should be at least a better hint on what is to do - install libjpeg-dev or some similar package, uninstall pillow, delete all remaninders from the previous aldryn run (project dir, manage.py), run aldryn again
@yakky
Copy link
Member

yakky commented Oct 17, 2013

I don't think there is any portable way to check for correct libraries installation.
It could be addressed in documentation and pre-installation checklist, though.

@henning
Copy link
Contributor Author

henning commented Oct 18, 2013

ok, yeah, I understand the portability thing, and guessed so.
in that case, the doc, and maybe testing it before even writing the manage.py and project dir might be desireable. I'd like to try to add this chnage myself, not sure when I'll find the time to do so, though.

@yakky
Copy link
Member

yakky commented Oct 19, 2013

https://github.com/nephila/aldryn-installer/blob/master/aldryn_installer/install/__init__.py#L23 should be enough to check for proper libraries to be installed at runtime

@yakky
Copy link
Member

yakky commented Oct 19, 2013

#24 should address native libraries installation documentation

@henning
Copy link
Contributor Author

henning commented Oct 19, 2013

Get's close to what I believe would be super-userfriendly :)
OK, that's already quite good to explain the dependencies, thanlks ;)

Still two things I'd propose to become really super-userfriendly:

  • do the pillow check earlier before the install(if we know it will fail with improper pillow install, no need to start generating the project etc.) - I currently understand it's only running after the django project creation, right?
  • the error message can tell unexperienced users more clearly what to do to get rid of the error(uninstall pillow, install something like libjpeg-dev, reinstall pillow) - I myself have 15 years of Linux experience so I know, but probably quite some cms devs have an easier life to be told this one more sentence

@henning
Copy link
Contributor Author

henning commented Oct 19, 2013

Hmm, strange, the code of main.py looks like the check is very well run before te django project is created.
But when using it here at the pycon Django tutorial i had all the project data created before the installer stopped with an unfinished install... we might have been using an older version? I'll check.

@yakky
Copy link
Member

yakky commented Oct 19, 2013

Yes, it's supposed to run before the project is created and exit raising exception

@henning
Copy link
Contributor Author

henning commented Oct 19, 2013

I double checked - it seems like it's right the in the case of insufficient Pillow install, it stops without having created anything, which is good.
So only some better hint for some people that do not know about devel libraries and such things might be helpful like: "Please install pillow with proper libjpeg support (e.g. on Ubuntu apt-get install libjpeg-dev, pip uninstall Pillow, pip install Pillow)"

I seem still getting another error that makes the install stop with an error, but having created the django project already, will investigate that and put it in another bugreport when i know more about it

@yakky
Copy link
Member

yakky commented Oct 20, 2013

Could you please check #25 if it makes clearer how to solve missing libraries issues?

@henning
Copy link
Contributor Author

henning commented Oct 20, 2013

It's getting close! :)

Two things still - considering we're doing that to lower the entry barrier
to get started as much as possible - also for people with neither longterm
Python nor sytem management/compiling knowledge:

  • point out which part of docs to look for: "... The libraries section /
    libraries.rst of the docs" - even better an exact file/path/url (the latter
    is most likely to be easiest as it doesn't depend on wherever the user
    installed aldryn installer) where the user can find it, he probably doesn't
    know when he just installed it via pip
  • it's helpful to note that it's not just libjpeg, but especially on binary
    distributions libjpeg-dev(or similar) that must be in place. Thats a common
    misunderstanding and an FAQ why it doesnt work even though the lib is
    installed. It might work for mac users working with brew, but is an issue
    for linux binary distributions which get more common for less experienced
    people.
    Am 20.10.2013 10:34 schrieb "Iacopo Spalletti" notifications@github.com:

Could you please check #25https://github.com/nephila/aldryn-installer/pull/25if it makes clearer how to solve missing libraries issues?


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-26668795
.

@yakky
Copy link
Member

yakky commented Oct 20, 2013

Updated. I guess that's the most we can go without writing an actual tutorial on how to solve python packages installation issues :)

@henning
Copy link
Contributor Author

henning commented Oct 21, 2013

Sure it's not the installer doc's task to give people overall knowledge about the whole python universe, I agree. Just the pointers that help to find the right solutions. In short words.

But somehow I don't see a change that matches your last comment(saying you did something reflecting my ideas from my last comment) - did you forget to push it?

@yakky
Copy link
Member

yakky commented Oct 21, 2013

Ooops :)

@henning
Copy link
Contributor Author

henning commented Oct 21, 2013

yeah, cool! thanks :)

@henning henning closed this as completed Oct 21, 2013
@yakky
Copy link
Member

yakky commented Oct 21, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants