I am trying to set up the compiled version of CPython, on Ubuntu 12.04, by following the python developer guide. Even after installing the dependent packages lzma and sqlite3,
I was able to build Python 3.3
without modifying setup.py
after installing the following packages on my Ubuntu Precise box.
build-essential
zlib1g-dev
libbz2-dev
libncurses5-dev
libreadline6-dev
libsqlite3-dev
libssl-dev
libgdbm-dev
liblzma-dev
tk8.5-dev
The lack of finding lzma and sqlite3 may be because your paths (LD_LIBRARY_PATH in particular) were incorrect. How did you install those two packages; did you use the package manager? If you installed manually, where did you install them? Also, did you install the development versions, if you used the package manager to install lzma and sqlite3? When installing from source, you'll need the development versions, so Python's source can find the necessary include files.
Further, you may have to edit setup.py
to indicate where these packages can be found.
As for tkinter: this relies on tcl/tk, so check that you have the development versions of these packages installed if you're installing python/tkinter from source.
This works for me (Python 3.4, Ubuntu 13.04) meaning "make" completes cleanly:
sudo apt-get install build-essential python-dev libncurses*-dev \
liblzma-dev libgdbm-dev libsqlite3-dev \
libbz2-dev tk-dev
Install:
cd python3.4
make clean && ./configure && make && sudo make install
I used the instructions here: python-on-debian-wheezy
But I also had to install tk-dev which wasn't listed there.