Answer the question
In order to leave comments, you need to log in
How to install Python3.3 on Debian x64?
Situation: on a remote Debian 6 x64 server. We are trying to start a Python script there.
For the script to work, you need Python 3.3 (this is the version, others do not roll) with the sqlite3 module (because the script writes to the database in this format)
By default, python 2.7 is installed on the server.
wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tar.bz2
tar jxf ./Python-3.3.0.tar.bz2
cd ./Python-3.3.0
./configure --prefix=/opt/python3.3
make && sudo make install
mkdir ~/bin
ln -s /opt/python3.3/bin/python ~/bin/py
apt-get install sqlite3
deb ftp.de.debian.org/debian experimental main
apt-get update && apt-get upgrade
apt-get install python3.3
apt-get install python3.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3.3: Depends: python3.3-minimal (= 3.3.0-12) but it is not going to be installed
Depends: libpython3.3-stdlib (= 3.3.0-12) but it is not going to be installed
E: Broken packages
apt-get install python3.3-minimal
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3.3-minimal: Depends: libexpat1 (>= 2.1~beta3) but 2.0.1-7+squeeze1 is to be installed
Recommends: python3.3 but it is not going to be installed
E: Broken packages
Answer the question
In order to leave comments, you need to log in
Problem solved. According to the error given when executing the script, I googled this page .
Then I rebuilt python 3.3 (I wrote in the subject how I did it) and it all worked
Something doesn't add up. Let's go in order.
By default, python 2.7 is installed on the server.How? The default is 2.6 . It's not in the backports.
But it is not clear how he can build sqlite3. Trying to install sqlite3 results in it being installed for Python 2.7. Which, in general, is expected.sqlite3 does not depend on python and does not contain its modules in its distribution. I checked in the minimum root, the python is not installed when installing sqlite3.
I found a python of the required version and for the required architectureYou can't satisfy all dependencies, they've come a long way. Most likely everything will rest against libc6, which will require updating the entire system.
apt-get -t experimental source python3.3 cd python3.3/debian dch --bpo cd.. dpkg-buildpackage -us -ucand satisfy the dependencies until it builds. Most likely you will have to carry something from squeeze-backports. You may need to slightly tweak the assembly rules. And you need to consider, you will still have two pythons on the server. Since 2.x comes by default, all packages from the standard repository will envy it.
Install the necessary packages (libpython3.3-stdlib, libexpat1).
Probably from the same repository as python3.
And keep your fists so that nothing breaks. For the test, I would first do this on a virtual machine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question