Re:The Python Standard Library - Where Modules Go To Die
by mas1n on Tuesday May 01, 2012 @09:24AM
(#3914180)
Or you can install virtualenvwrapper (http://www.doughellmann.com/projects/virtualenvwrapper/) and after a little configuration...
$ mkvirtualenv env1
(env1)$ pip install somepackage
Creating self containing python projects has never been so easy!
Re:The Python Standard Library - Where Modules Go To Die
by nkoren on Tuesday May 01, 2012 @07:13AM
(#3913774)
Yep, I learned this trick on my first go-around. The problem has occurred when I've tried to run scripts with dependencies which somehow are only available in mutually incompatible versions of Python. I'm not sure how this is possible (it's baffling -- it shouldn't be possible), but it's happened three out of four times that I've tried to use a Python script of any real consequence. Usually after half a day of futilely trying to find an environment which will actually accommodate all dependencies, I end up having to port everything to whatever version of Python appears to be the most common denominator. In all fairness to Python, this is relatively easy to do (except in one case, when I had to hire a Python-expert friend to do it), but it still means that what should've been a five-minute affair (less the dependency hell) turns into a full-day affair.
Like I say, I've probably just been unlucky. But at this point it's given me a pretty serious aversion to Python. Will probably have to get over that someday, I suppose.
Re:The Python Standard Library - Where Modules Go To Die
by anthonyb on Tuesday May 01, 2012 @08:53PM
(#3917105)
Which packages? I'm curious, because unless you're trying to work in Python 2 and 3 at the same time, I can't think of any packages which don't support 2.5, 2.6 and 2.7. And I've been programming in Python about 10 years or so. Unless you're going super-bleeding-edge, it shouldn't be a problem.
Create a virtual environment for the Python version you want to use, and install the package with pip (pip will install all the dependencies in your project's local environment)...