How are you ever going to manage Python Packages? PyPi and pip
1–10 of 17 posts
Re: How are you ever going to manage Python Packages? PyPi and pip
#2Virtualenv allows you to sandbox all your packages in a directory local to your development/deployment environment. You no longer need to install anything on the base system, and you can have multiple virtualenvs side-by-side. In addition, you can copy a virtualenv from your build environment to your production environment by just copying the directory.
This gives you huge wins in versioning packages, testing out different versions alongside each other, and being able to strongly validate that what you tested in your staging environment is the same thing that got deployed to your production systems.
In general, I'm a very strong believer of pushing _everything_ your production environment relies on to a single directory on your production system, rather than installing it on the base system. It's actually rather surprising more people haven't moved to this model, and that there aren't better tools to support it.
Re: How are you ever going to manage Python Packages? PyPi and pip
#3It is still good, but nowhere near as great as gem or apt. But maybe that is just me being unlucky...
Re: How are you ever going to manage Python Packages? PyPi and pip
#4Re: How are you ever going to manage Python Packages? PyPi and pip
#5This article is missing the best tool of the bunch: virtualenv. Part of the fundamental reason managing python packages is such a pain (or perl packages, or ruby packages, etc) is that they're installed once for the whole system. Virtualenv allows you to sandbox all your packages in a directory local to your development/deployment environment. You no longer need to install anything on the base system, and you can hav…
Not if you're developing on a different platform/architecture than you're deploying to (e.g. OS X vs. Linux). Unless you're only using pure Python modules, which excludes PIL and most database drivers.
Other than that, you're very right.
Re: How are you ever going to manage Python Packages? PyPi and pip
#6This article is missing the best tool of the bunch: virtualenv. Part of the fundamental reason managing python packages is such a pain (or perl packages, or ruby packages, etc) is that they're installed once for the whole system. Virtualenv allows you to sandbox all your packages in a directory local to your development/deployment environment. You no longer need to install anything on the base system, and you can hav…
1) We develop on macs 2) Our deploy environments are a mix of 32-bit/64-bit machines running Ubnutu 3) It wasn't clear if each deployment required its own virtualenv to start from scratch OR if we should reuse a virtualenv (which seemed to defeat the whole point of using virtualenv)
Got any ideas on what we could do?
Re: How are you ever going to manage Python Packages? PyPi and pip
#7I had a rather less flattering experience. It seems half the time I pull stuff using pip, it will fetch the wrong version or fail to compile, or not fetch essential dependencies... It is still good, but nowhere near as great as gem or apt. But maybe that is just me being unlucky...
Forking these projects and fixing the setup.py is probably the best solution. If they're active projects and you'll want their updates, they're likely to accept your patch. If they're inactive, it doesn't really matter that you're using a fork anyway.
Re: How are you ever going to manage Python Packages? PyPi and pip
#8I had a rather less flattering experience. It seems half the time I pull stuff using pip, it will fetch the wrong version or fail to compile, or not fetch essential dependencies... It is still good, but nowhere near as great as gem or apt. But maybe that is just me being unlucky...
pip install tornado==1.1
OR if you know you ONLY want tornado 2.0
pip install tornado==2.0
From my experience, pip has been able to fetch PYTHON dependencies if the author of the package wrote their setup.py correctly. I agree that things could be better with regards to C dependencies (MySQL-Python requiring libmysql5dev being particularly annoying) but this is hard to do as every environment has their own way of naming dependent libs.
Re: How are you ever going to manage Python Packages? PyPi and pip
#9This article is missing the best tool of the bunch: virtualenv. Part of the fundamental reason managing python packages is such a pain (or perl packages, or ruby packages, etc) is that they're installed once for the whole system. Virtualenv allows you to sandbox all your packages in a directory local to your development/deployment environment. You no longer need to install anything on the base system, and you can hav…
Hi, I'm the author of the article. We've definitely looked at virtualenv but for right now we're just developing a single app. Thus far, we've been able to get away with munging the global package list but this could change in the near future. I tried playing around with virtualenv earlier this year but I couldn't figure out how to push directories OR make virtualenvs reliably relocatable. The main problems for us we…
Re: How are you ever going to manage Python Packages? PyPi and pip
#10Not sure if pip lets you run configuration scripts during various stages of install and un-install?
Does pip let you depend on C libraries and other system features?
How does pip handle obsoletes and transitive dependencies?