Hacker News new | ask | show | jobs
Getting Started with Python - Installing Packages (craigkerstiens.com)
82 points by asenchi2 5344 days ago
5 comments

Quick aside, I'm glad the next version of virtualenv (1.7) wont install site-packages by default, so you won't need the --no-site-packages flag anymore. In fact, you'll need the --use-site-packages flag if you want all the installed packages for your python dist.

Quite the welcome change (at least for me).

http://www.virtualenv.org/en/latest/news.html

As a further aside, there's a recent PEP that proposes to incorporate the concept of virtual environments into Python itself:

http://www.python.org/dev/peps/pep-0404/

Cool, good news to hear!
Pip is an awesome tool for Python development and deployment. One of the great things is its ability to use version control commits and tags as packages, as well as tarballs, and PyPi.
You're slightly ahead of my next post which calls out some of the more advanced ways of using it.
I'm surprised every time I hear Python users claiming unfamiliarity with pip. Until it's as familiar to folks as indoor plumbing, the more pip publicity and tutorials the better.
Oops! Didn't mean to steal your thunder, just happy about pip's flexibility in that regard!
No worries, fully agree more people need to be using and using it to what its capable of.
Nice post. I did some user tests on Friday with beginning Python developers and found they were completely mystified by the pip install process.

I feel like adding virtualenv on top is the right approach, in the long run, but for the beginning developer it might be better just to install plain pip while he is struggling to figure out how to get packages installed, and then later figure out how to do virtualenv.

Almost everyone's first experience with pip is in the context of another task, like trying to use the twilio-python library (the use case I was testing Friday). In that context they're not looking to learn how to use pip correctly (or learn why they need virtualenv) but trying to do something like send a text message or run Flask or whatever.

Adding virtualenv is definitely one more layer of complexity, however installing everything to site-packages is asking for a lot of trouble to new users that don't understand whats going on. As soon as they have multiple versions of a library from different projects they will be an a world of hurt that they're unaware of how to untangle themselves. Starting with virtualenv from the beginning really will help prevent a lot of headache later.

If you're using Flask now and use it later and have two various versions you essentially get 1 working application and 1 broken one due to versions.

What about pythonbrew[1]?

[1] https://github.com/utahta/pythonbrew

Timely! I was just looking around for such a thing yesterday. Thanks.

On a related note, is there a wiki or site which collects blog posts on doing things in a language? Having a list of relevant (and community approved) posts generally in order of how a newcomer would encounter them for any language would be an amazing jump off point...

Here is another good comparison post between Ruby and Python packaging: http://gillesfabio.com/blog/2011/03/01/rvm-for-pythonistas-v...
Great! Very straightforward. It was leaving out the --no-site-packages which was throwing me off..

I wanted to start doing some work on a web framework I'm interested in, so I'm guessing the best way is to create a virtualenv just for that framework, pull it in to the virtualenv packages folder from github, and then I'm set?