Howto update a package in venv

41 views
Skip to first unread message

Michael Lind Hjulskov

unread,
Jun 21, 2014, 11:57:31 AM6/21/14
to django...@googlegroups.com
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

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

Tom Evans

unread,
Jun 21, 2014, 5:29:24 PM6/21/14
to django...@googlegroups.com
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

Lachlan Musicman

unread,
Jun 22, 2014, 7:07:20 AM6/22/14
to django...@googlegroups.com
I'm a big fan of pip-tools:

pip install pip-tools

Once installed, you can do:

pip-review --interactive

which will check all installed apps and off to update them - you can
choose to upgrade for each app (hence the --interactive).

Cheers
L.
> --
> 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...@googlegroups.com.
> To post to this group, send email to django...@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/CAFHbX1LHCcB%3DwOri0pZu9VBy5CRWCcySSVMukYMC0e84hcKAQg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
The idea is that a beautiful image is frameable. Everything you need
to see is there: It’s everything you want, and it’s very pleasing
because there’s no extra information that you don’t get to see.
Everything’s in a nice package for you. But sublime art is
unframeable: It’s an image or idea that implies that there’s a bigger
image or idea that you can’t see: You’re only getting to look at a
fraction of it, and in that way it’s both beautiful and scary, because
it’s reminding you that there’s more that you don’t have access to.
It’s now sort of left the piece itself and it’s become your own
invention, so it’s personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
-----------------------------------------------------------------------------------------------------------
Adventure Time http://theholenearthecenteroftheworld.com/

Michael Lind Hjulskov

unread,
Jun 25, 2014, 10:27:42 AM6/25/14
to django...@googlegroups.com, teva...@googlemail.com
That did the trick Tom
Thanks alot for spending Your time on me.
Cheers

Michael Lind Hjulskov

unread,
Jun 25, 2014, 10:29:32 AM6/25/14
to django...@googlegroups.com
Thanks Lachlan
Good to know
Python and Django is so cool and full of fancy stuff.
Have a good day
Reply all
Reply to author
Forward
0 new messages