Virtualenv

8 views
Skip to first unread message

Ben Rousch

unread,
Apr 25, 2013, 11:44:51 AM4/25/13
to GRPUG: Grand Rapids Python Users Group
At the last meeting a few of you mentioned that you're not using virtualenvs. Shame on you! Here's an easy, quick introduction to virtualenv to get you started along the right path http://dabapps.com/blog/introduction-to-pip-and-virtualenv-python/ 

--
 Ben Rousch
   bro...@gmail.com
   http://clusterbleep.net/

Jonathon Klobucar

unread,
Apr 25, 2013, 11:50:25 AM4/25/13
to gr...@googlegroups.com
Then add a little virtualenv sugar called virtualenvwrapper http://virtualenvwrapper.readthedocs.org/en/latest/

-- Jon

--
You received this message because you are subscribed to the Google Groups "GRPUG: Grand Rapids Python Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpug+un...@googlegroups.com.
To post to this group, send email to gr...@googlegroups.com.
Visit this group at http://groups.google.com/group/grpug?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Adam Tauno Williams

unread,
Apr 25, 2013, 12:06:00 PM4/25/13
to gr...@googlegroups.com
On Thu, 2013-04-25 at 11:44 -0400, Ben Rousch wrote:
> At the last meeting a few of you mentioned that you're not using
> virtualenvs.

WHAT??!?!??!

> Shame on you!

I'll admit I resisted using virtualenv for awhile; I generally dislike
language specific deployment hacks [and, yes, virtualenv is a HACK, a
hack around the steaming-mega-hack that is Python's tragically lame,
sad, and pathetic excuse for packaging].

But it works extremely well, stays out of the way, and doesn't really
add much complexity. It works so well in fact that I can go a week or
more without cursing at Python for its silly bailing-twine and duct-tape
based packaging and module scheme. Eggs are so easily broken - it is a
good choice for the name of python packages.

> Here's an easy, quick introduction to virtualenv to get you started
> along the right path
> http://dabapps.com/blog/introduction-to-pip-and-virtualenv-python/

Get virtualenv
Make a directory
Run virtualenv {directory}
Go into the directory
Run . bin/activate
Start writing code, installing dependencies, etc...

You just have to remember to ". bin/activate" and that the session you
do that in is ruined for any other purpose.

But use Make files to automate packaging, testing, etc... Then you can
use a normal and proper tool to hide the HACK and mostly forget all
about it.


--
Adam Tauno Williams <mailto:awil...@whitemice.org> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA

Reply all
Reply to author
Forward
0 new messages