How to install MySQLdb in a virtualenv on Ubuntu Karmic
- Install dependencies
sudo apt-get build-dep python-mysqldb
- Install MySQLdb with pip/virtualenv
cd ~/lib/python-environments virtualenv --distribute --no-site-packages default pip install -E default/ MySQL-python
EnvironmentError: mysql_config not found
The first time, I did not install the dependencies and got the following error:
$ pip install -E default/ http://sourceforge.net/projects/mysql-python/files/mysql-python-test/1.2.3c1/MySQL-python-1.2.3c1.tar.gz/download Downloading/unpacking http://sourceforge.net/projects/mysql-python/files/mysql-python-test/1.2.3c1/MySQL-python-1.2.3c1.tar.gz/download Downloading download (89Kb): 89Kb downloaded Running setup.py egg_info for package from http://sourceforge.net/projects/mysql-python/files/mysql-python-test/1.2 ...... read more »
How to install pip on Ubuntu
Pip is a better alternative to Easy Install for installing Python packages. For more information on pip and its companion, virtualenv, see my blog post: Notes on using pip and virtualenv with Django.
- Install Easy Install
sudo apt-get install python-setuptools python-dev build-essential
- Install pip
sudo easy_install pip
Using psycopg2 with virtualenv on Ubuntu JauntyLucid
Update 2009-11-02: Well I am dumb-- psycopg2 can be installed with pip/easy_install. The reason I got the error before was because I didn't have the required dependencies installed. On Ubuntu, I used apt-get build-dep. So, here's the summary:
Update 2009-11-11: My update doesn't work. See comments #4 and #5 below.
Update 2010-05-17: Here is what finally worked for me using Python 2.6 on Ubuntu 10.04 Lucid Lynx using virtualenv 1.4.8 and pip 0.7.1. Thanks to Daniel for the final piece of the solution.
Install dependencies
$ sudo apt-get build-dep python-psycopg2
Install ...
... read more »Notes on using pip and virtualenv with Django
I have been using
a symlinking method to install Python packages up to this point. To better
handle dependencies and multiple versions I have wanted to switch over to
pip and
virtualenv.
Pip is a better alternative to
Easy Install
and virtualenv is a tool to create isolated Python environments.
I have wanted to use pip and virtualenv for a long time now. Finally, today,
I took my first steps and created an environment with the Python packages
required for this blog. My notes are below. (I am running Ubuntu
IntrepidKarmic and Python 2.52.6.)
A lot ...
... read more »Installing Python 2.6 from source on Ubuntu Hardy
Python 2.6 was released yesterday! This version aims to smooth the transition from Python 2.5 to Python 3.0 which is planned for release soon (currently available as a release candidate). Python 3.0 will be break backwards compatibility with the 2.x series. Python 2.6 is backwards compatible with 2.5. All the backwards compatible features of 3.0 have been backported to 2.6.
One of the new 2.6 features I'm particularly intersted in is the new multiprocessing module which has a similar interface to the threading module, but it uses processes instead ...
... read more »Somewhere on your Python path
As I install new python packages, I sometimes see instructions
which say something like "check out the code, and place it somewhere
on your Python path". These are very simple instructions, but
since it is not automatic like a Windows installer, or Ubuntu's
package management system, it causes me to pause. Where on my
Python path should I put it? I could put all my packages in
random places and update my PYTHONPATH environment variable every time. I also
thought about putting new packages in Python's site-packages
directory. This is probably a good option. However, I tend to ...
How to install Easy Install for Python
Update 2009-03-31:- For current installation instructions on Windows and Cygwin, see http://pypi.python.org/pypi/setuptools.
- For a better alternative to Easy Install, see pip by Ian Bicking
How to install Easy Install on Ubuntu Linux
$ sudo apt-get install python-setuptools python-dev build-essential
- Go to http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install
- Right click on "ez_setup.py" and save the file to "c:\temp"
- Open a cmd.exe prompt
- "cd c:\temp"
- "python ez_setup.py"
How to install Easy Install on Cygwin
$ cd /tmp$ wget http://peak.telecommunity.com/dist/ez_setup.py$ python ...
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(4)
-
aws
(8)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(9)
-
conkeror
(2)
-
cygwin
(18)
-
datastructures
(15)
-
datetime
(3)
-
dell
(3)
-
django
(39)
-
emacs
(20)
-
files_directories
(10)
-
install_setup
(7)
-
javascript
(3)
-
keyboard
(6)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
preferences
(8)
-
processes
(3)
-
pyqt
(18)
-
python
(122)
-
ratpoison
(3)
-
regexes
(5)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(13)
-
ssh
(7)
-
subversion
(6)
-
twisted
(6)
-
ubuntu
(60)
-
urxvt
(5)
-
vxworks
(25)
-
webservices
(4)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan