简体   繁体   中英

Cannot install Python 3x on Debian Apache 2. Tried Wheezy and Jessie

Ok I give up. I have had python 2.7 installed at one point on a previous (wheezy) build. Python 2.7 is no good to me. I need 3.x. Python 3.4.2 runs ok on Debian, but not on Apache 2 on Debian. I need it to run to build web applications.

I have tried everything on Google that is Debian and Ubunto related. Nothing works, but with every change my system gets worse. Here is the latest output:

root@debian:~# sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  debconf python-imaging python-pil
Suggested packages:
  debconf-doc debconf-utils libterm-readline-gnu-perl libnet-ldap-perl libqtgui4-perl libqtcore4-perl
  python-pil-doc python-pil-dbg
The following packages will be upgraded:
  debconf python-imaging python-pil
3 upgraded, 0 newly installed, 0 to remove and 1337 not upgraded.
25 not fully installed or removed.
Need to get 0 B/564 kB of archives.
After this operation, 122 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
/bin/sh: 1: /usr/bin/apt-listchanges: not found
Preconfiguring packages ...
(Reading database ... 144560 files and directories currently installed.)
Preparing to unpack .../debconf_1.5.59_all.deb ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/debconf_1.5.59_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/debconf_1.5.59_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried sudo apt-get install -f and I have tried sudo apt-get clean $ sudo apt-get install -f $ sudo apt-get update and a configure one.

Has anyone got Python 3 working on Apache 2 on Any Debian?

btw /usr/bin/apt-listchanges: not found is due to me meddling. Yes, I am starting to meddle and that is bad.

Have you tried using the Anaconda Python distribution?

Something like this may help, from this helpful article :

$ wget http://repo.continuum.io/miniconda/Miniconda-3.5.5-Linux-armv6l.sh
$ md5sum Miniconda-3.5.5-Linux-armv6l.sh
2f37cb775ec3e482280a7bd6b97ee501
$ /bin/bash Miniconda-3.5.5-Linux-armv6l.sh

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM