V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
h19981126g
V2EX  ›  程序员

Debian8 下我想安装个 python3 的 pip,然而各种报错,完全不懂

  •  
  •   h19981126g · 2018-08-11 09:55:27 +08:00 · 5715 次点击
    这是一个创建于 2304 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Debian8 下我想安装个 python3 的 pip,系统自带了 python3.4.2,然后就是各种报错,试了网上的各种方法,就是不行,不过 pip list 能显示一半,然后就是报错。显示如下:
    root@debian:~# python3 get-pip.py
    Exception:
    Traceback (most recent call last):
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/basecommand.py", line 228, in main
    status = self.run(options, args)
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/commands/install.py", line 241, in run
    with self._build_session(options) as session:
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/basecommand.py", line 81, in _build_session
    insecure_hosts=options.trusted_hosts,
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/download.py", line 338, in __init__
    self.headers["User-Agent"] = user_agent()
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/download.py", line 101, in user_agent
    zip(["name", "version", "id"], distro.linux_distribution()),
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 120, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 634, in linux_distribution
    self.version(),
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 688, in version
    self.lsb_release_attr('release'),
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 836, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 522, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 933, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
    File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
    subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1
    Traceback (most recent call last):
    File "get-pip.py", line 20649, in <module>
    main()
    File "get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
    File "get-pip.py", line 175, in bootstrap
    sys.exit(pip._internal.main(args))
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/__init__.py", line 246, in main
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/basecommand.py", line 264, in main
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/basecommand.py", line 81, in _build_session
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/download.py", line 338, in __init__
    File "/tmp/tmp54idda2a/pip.zip/pip/_internal/download.py", line 101, in user_agent
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 120, in linux_distribution
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 634, in linux_distribution
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 688, in version
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 836, in lsb_release_attr
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 522, in __get__
    File "/tmp/tmp54idda2a/pip.zip/pip/_vendor/distro.py", line 933, in _lsb_release_info
    File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
    subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1
    root@debian:~# apt-get install python-pip
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    python-pip is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 110 not upgraded.
    17 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Traceback (most recent call last):
    File "/usr/bin/apt-listchanges", line 28, in <module>
    import apt_pkg
    ImportError: No module named 'apt_pkg'
    Setting up python-apt (0.9.3.12) ...
    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 processing package python-apt (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of apt-listchanges:
    apt-listchanges depends on python-apt (>= 0.7.93); however:
    Package python-apt is not configured yet.

    dpkg: error processing package apt-listchanges (--configure):
    dependency problems - leaving unconfigured
    Setting up python-ply (3.4-5) ...
    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 processing package python-ply (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-pycparser:
    python-pycparser depends on python-ply (>= 3.2); however:
    Package python-ply is not configured yet.
    python-pycparser depends on python-ply (<< 3.5) | python-ply-yacc-3.2; however:
    Package python-ply is not configured yet.
    Package python-ply-yacc-3.2 is not installed.
    Package python-ply which provides python-ply-yacc-3.2 is not configured yet.
    python-pycparser depends on python-ply-lex-3.2; however:
    Package python-ply-lex-3.2 is not installed.
    Package python-ply which provides python-ply-lex-3.2 is not configured yet.

    dpkg: error processing package python-pycparser (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of python-cffi:
    python-cffi depends on python-pycparser; however:
    Package python-pycparser is not configured yet.

    dpkg: error processing package python-cffi (--configure):
    dependency problems - leaving unconfigured
    Setting up python-colorama (0.3.2-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 processing package python-colorama (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-cryptography:
    python-cryptography depends on python-cffi; however:
    Package python-cffi is not configured yet.

    dpkg: error processing package python-cryptography (--configure):
    dependency problems - leaving unconfigured
    Setting up python-distlib (0.1.9-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 processing package python-distlib (--configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up python-html5lib (0.999-3) ...
    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 processing package python-html5lib (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-openssl:
    python-openssl depends on python-cryptography; however:
    Package python-cryptography is not configured yet.

    dpkg: error processing package python-openssl (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of python-ndg-httpsclient:
    python-ndg-httpsclient depends on python-openssl; however:
    Package python-openssl is not configured yet.

    dpkg: error processing package python-ndg-httpsclient (--configure):
    dependency problems - leaving unconfigured
    Setting up python-urllib3 (1.16-1+deb8u1) ...
    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 processing package python-urllib3 (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-requests:
    python-requests depends on python-urllib3 (>= 1.16); however:
    Package python-urllib3 is not configured yet.
    python-requests depends on python-urllib3 (<< 1.16.1); however:
    Package python-urllib3 is not configured yet.

    dpkg: error processing package python-requests (--configure):
    dependency problems - leaving unconfigured
    Setting up python-setuptools (5.5.1-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 processing package python-setuptools (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-pip:
    python-pip depends on python-colorama; however:
    Package python-colorama is not configured yet.
    python-pip depends on python-distlib; however:
    Package python-distlib is not configured yet.
    python-pip depends on python-html5lib; however:
    Package python-html5lib is not configured yet.
    python-pip depends on python-requests; however:
    Package python-requests is not configured yet.
    python-pip depends on python-setuptools (>= 0.6c1); however:
    Package python-setuptools is not configured yet.

    dpkg: error processing package python-pip (--configure):
    dependency problems - leaving unconfigured
    Setting up python-pyasn1 (0.1.7-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 processing package python-pyasn1 (--configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up python-wheel (0.24.0-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 processing package python-wheel (--configure):
    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    python-apt
    apt-listchanges
    python-ply
    python-pycparser
    python-cffi
    python-colorama
    python-cryptography
    python-distlib
    python-html5lib
    python-openssl
    python-ndg-httpsclient
    python-urllib3
    python-requests
    python-setuptools
    python-pip
    python-pyasn1
    python-wheel
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    求助求助!
    19 条回复    2018-08-12 01:33:11 +08:00
    crazycabbage
        1
    crazycabbage  
       2018-08-11 10:50:29 +08:00 via iPhone
    1.难道没有自带 pip3 吗?我用的 debian9 表示一切良好。


    2.从报错信息来看


    ```
    from ConfigParser import SafeConfigParser
    ImportError: No module named 'ConfigParser'
    dpkg: error processing package python-apt (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of apt-listchanges:
    apt-listchanges depends on python-apt (>= 0.7.93); however:
    Package python-apt is not configured yet.
    ```


    这里可以看出`
    ImportError: No module named 'ConfigParser'`这个是 Python2 才有的 module,这里可能是系统的 Python 被链接到了 Python3 而不 Python2 导致的,可以检查一下是不是默认 Python 是 3 而不是 2。
    h19981126g
        2
    h19981126g  
    OP
       2018-08-11 11:08:53 +08:00
    @crazycabbage 呃,我 update-alternatives --list 列出只有 python3.4,默认输入 python 打开的是 python3,但 python2 也能打开 python2.7.9,这要怎么搞?
    likuku
        3
    likuku  
       2018-08-11 11:10:53 +08:00 via iPhone
    pyenv 最棒了
    crazycabbage
        4
    crazycabbage  
       2018-08-11 11:13:45 +08:00 via iPhone
    @h19981126g 去 /usr/bin 中把 Python 链接到 Python2
    h19981126g
        5
    h19981126g  
    OP
       2018-08-11 11:14:32 +08:00
    @likuku Traceback (most recent call last):
    File "/usr/bin/apt-listchanges", line 28, in <module>
    import apt_pkg
    ImportError: No module named 'apt_pkg'
    Preconfiguring packages ...
    (Reading database ... 41918 files and directories currently installed.)
    Preparing to unpack .../libssl-dev_1.0.1t-1+deb8u9_amd64.deb ...
    Unpacking libssl-dev:amd64 (1.0.1t-1+deb8u9) over (1.0.1t-1+deb8u8) ...
    Preparing to unpack .../libssl1.0.0_1.0.1t-1+deb8u9_amd64.deb ...
    Unpacking libssl1.0.0:amd64 (1.0.1t-1+deb8u9) over (1.0.1t-1+deb8u8) ...
    Selecting previously unselected package libreadline6-dev:amd64.
    Preparing to unpack .../libreadline6-dev_6.3-8+b3_amd64.deb ...
    Unpacking libreadline6-dev:amd64 (6.3-8+b3) ...
    Selecting previously unselected package libreadline-dev:amd64.
    Preparing to unpack .../libreadline-dev_6.3-8+b3_amd64.deb ...
    Unpacking libreadline-dev:amd64 (6.3-8+b3) ...
    Selecting previously unselected package libsqlite3-dev:amd64.
    Preparing to unpack .../libsqlite3-dev_3.8.7.1-1+deb8u2_amd64.deb ...
    Unpacking libsqlite3-dev:amd64 (3.8.7.1-1+deb8u2) ...
    Processing triggers for install-info (5.2.0.dfsg.1-6) ...
    Setting up python-apt (0.9.3.12) ...
    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 processing package python-apt (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of apt-listchanges:
    apt-listchanges depends on python-apt (>= 0.7.93); however:
    Package python-apt is not configured yet.

    dpkg: error processing package apt-listchanges (--configure):
    dependency problems - leaving unconfigured
    Setting up python-ply (3.4-5) ...
    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 processing package python-ply (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-pycparser:
    python-pycparser depends on python-ply (>= 3.2); however:
    Package python-ply is not configured yet.
    python-pycparser depends on python-ply (<< 3.5) | python-ply-yacc-3.2; however:
    Package python-ply is not configured yet.
    Package python-ply-yacc-3.2 is not installed.
    Package python-ply which provides python-ply-yacc-3.2 is not configured yet.
    python-pycparser depends on python-ply-lex-3.2; however:
    Package python-ply-lex-3.2 is not installed.
    Package python-ply which provides python-ply-lex-3.2 is not configured yet.

    dpkg: error processing package python-pycparser (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of python-cffi:
    python-cffi depends on python-pycparser; however:
    Package python-pycparser is not configured yet.

    dpkg: error processing package python-cffi (--configure):
    dependency problems - leaving unconfigured
    Setting up python-colorama (0.3.2-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 processing package python-colorama (--configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up libssl1.0.0:amd64 (1.0.1t-1+deb8u9) ...
    Setting up libssl-dev:amd64 (1.0.1t-1+deb8u9) ...
    dpkg: dependency problems prevent configuration of python-cryptography:
    python-cryptography depends on python-cffi; however:
    Package python-cffi is not configured yet.

    dpkg: error processing package python-cryptography (--configure):
    dependency problems - leaving unconfigured
    Setting up python-distlib (0.1.9-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 processing package python-distlib (--configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up python-html5lib (0.999-3) ...
    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 processing package python-html5lib (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-openssl:
    python-openssl depends on python-cryptography; however:
    Package python-cryptography is not configured yet.

    dpkg: error processing package python-openssl (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of python-ndg-httpsclient:
    python-ndg-httpsclient depends on python-openssl; however:
    Package python-openssl is not configured yet.

    dpkg: error processing package python-ndg-httpsclient (--configure):
    dependency problems - leaving unconfigured
    Setting up python-urllib3 (1.16-1+deb8u1) ...
    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 processing package python-urllib3 (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-requests:
    python-requests depends on python-urllib3 (>= 1.16); however:
    Package python-urllib3 is not configured yet.
    python-requests depends on python-urllib3 (<< 1.16.1); however:
    Package python-urllib3 is not configured yet.

    dpkg: error processing package python-requests (--configure):
    dependency problems - leaving unconfigured
    Setting up python-setuptools (5.5.1-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 processing package python-setuptools (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of python-pip:
    python-pip depends on python-colorama; however:
    Package python-colorama is not configured yet.
    python-pip depends on python-distlib; however:
    Package python-distlib is not configured yet.
    python-pip depends on python-html5lib; however:
    Package python-html5lib is not configured yet.
    python-pip depends on python-requests; however:
    Package python-requests is not configured yet.
    python-pip depends on python-setuptools (>= 0.6c1); however:
    Package python-setuptools is not configured yet.

    dpkg: error processing package python-pip (--configure):
    dependency problems - leaving unconfigured
    Setting up python-pyasn1 (0.1.7-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 processing package python-pyasn1 (--configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up python-wheel (0.24.0-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 processing package python-wheel (--configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up libreadline6-dev:amd64 (6.3-8+b3) ...
    Setting up libreadline-dev:amd64 (6.3-8+b3) ...
    Setting up libsqlite3-dev:amd64 (3.8.7.1-1+deb8u2) ...
    Processing triggers for libc-bin (2.19-18+deb8u7) ...
    Errors were encountered while processing:
    python-apt
    apt-listchanges
    python-ply
    python-pycparser
    python-cffi
    python-colorama
    python-cryptography
    python-distlib
    python-html5lib
    python-openssl
    python-ndg-httpsclient
    python-urllib3
    python-requests
    python-setuptools
    python-pip
    python-pyasn1
    python-wheel
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    如你所见的报错 No module named 'apt_pkg'
    h19981126g
        6
    h19981126g  
    OP
       2018-08-11 11:23:31 +08:00
    @crazycabbage 改回了,我需要用 python3 的库怎么办
    affyun
        7
    affyun  
       2018-08-11 11:31:34 +08:00 via Android
    Python3 的 pip 有 pip3,你是要折腾什么?
    apt install python3-pip
    thedog
        8
    thedog  
       2018-08-11 11:33:46 +08:00 via Android
    装个 miniconda 吧
    h19981126g
        9
    h19981126g  
    OP
       2018-08-11 11:40:17 +08:00
    @crazycabbage
    @affyun
    @thedog 嗯嗯,知道了
    SimonFu
        10
    SimonFu  
       2018-08-11 11:40:39 +08:00
    这几天一直在折腾树莓派,装的 stretech,

    apt 安装的 python3

    然后 python3 get-pip.py

    没有遇到这个问题呢。。
    mazyi
        11
    mazyi  
       2018-08-11 11:48:31 +08:00 via iPhone
    apt-get 不好用咩
    likuku
        12
    likuku  
       2018-08-11 12:28:55 +08:00
    经验: 系统自带 python 不要去碰它了,先装好 pyenv,用 pyenv 来安装自己想要的 python2.x 3.x
    likuku
        13
    likuku  
       2018-08-11 12:30:33 +08:00
    我 debian8 下就是按 #12 方式来安装 python3 来跑 flask + gunicorn 的
    Showfom
        14
    Showfom  
       2018-08-11 12:55:29 +08:00 via iPhone
    Debian 8 已经不更新了 只有安全更新 建议换 Debian 9 或 10
    Rehtt
        15
    Rehtt  
       2018-08-11 12:59:23 +08:00 via Android
    试试
    apt install pytgon3-pip
    Tink
        16
    Tink  
       2018-08-11 15:29:43 +08:00 via iPhone
    现在已经装废了,重装吧
    chesterzzy
        17
    chesterzzy  
       2018-08-11 15:38:43 +08:00
    anaconda 多省事儿
    izoabr
        18
    izoabr  
       2018-08-11 23:16:44 +08:00
    @crazycabbage 吓得我赶紧去查了一下文档,因为刚刚帮别人写了一个 PY3 的东西,为了方便里面用了 configparser,我本地运行没问题,就给人家了。。。
    https://docs.python.org/3/library/configparser.html
    dontaskcece
        19
    dontaskcece  
       2018-08-12 01:33:11 +08:00
    pyenv
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1007 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:05 · PVG 03:05 · LAX 11:05 · JFK 14:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.