virtualenvs or: How I Learned to Stop Worrying and Love not having sudo powers in a server

Well, you might think, there is always pip install --user. Aha! Yes, that works most of the time, but not when some package upgrade (distribute for deepTools) conflicts with globally installed packages.

The solution (for python packages)

Python virtualenvs to the rescue!

These have been around for sometime, but I never felt inclined to dig into it until now (I can also be a bit of a Luddite). Put simply, virtualenvs are reservoirs of custom python and package installations. In practice, one creates a folder where all the packages can be installed, and then simply source it. From that point on, everythying done in python is using whathever is in that folder or virtualenv. Even a copy of the python binary will be there.

One of the major appeals, for me at least, is that no sudo is required for the set-up of the virtualenv or installation of packages. Also, one can have multiple virtualenvs, say for different projects.

For a proper (practical tutorial) see this post by Jamie Mathews.

In the meantime, deepTools just finished compiling and I can now go to work.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s