Wednesday, June 25, 2014

Re: Howto update a package in venv

That did the trick Tom
Thanks alot for spending Your time on me.
Cheers

Den lørdag den 21. juni 2014 23.29.24 UTC+2 skrev Tom Evans:
On Sat, Jun 21, 2014 at 4:57 PM, Michael Lind Hjulskov
<mhju...@gmail.com> wrote:
> Hi
>
> Im relative new to Django and Linux commands etc.
> I hope to get help in here :o)
>
> I use virtualenv and requirements and one of the requirements is Sorl
> But Sorl together with Django 1.6.5 is giving me this error on runserver
> "/home/mh/v/local/lib/python2.7/site-packages/sorl/thumbnail/helpers.py:5:
> DeprecationWarning: django.utils.simplejson is deprecated; use json instead.
>   from django.utils import simplejson"
>
> I believe i found a fix here
> https://github.com/mariocesar/sorl-thumbnail/pull/165/files
>
> My question is
> 1. Is there a way that I can simply add a line to my requirements.txt file,
> so that these two files will be automatically updated when I do the "pip -r
> requirements.txt" ?
> 2. if not, how do I pull such changes into my sorl, inside my venv?
>
> Bby the way, is this the right place to ask such questions? or is there
> anoter forum/group I should use?
>
> Thank You :o)
>
> Michael

That fix (a better one, actually) is in a released version of
sorl-thumbnail - 11.12.1b.

So you should just be able to say "pip install --upgrade
sorl-thumbnail" and it will install the correct (latest) version.

You can check what version you currently have with "pip freeze".

You can specify you want that exact version in your requirements.txt,
or even on the command line - "sorl-thumbnail==11.12.1b" - but I
wouldn't do that. I much prefer this in development
"sorl-thumbnail>=11.12.1b", or more conservatively on a production
box, "sorl-thumbnail>=11.12.1b,<11.13".

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5e7e2b67-4ca7-436e-834e-82ff530fd614%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment