deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

python3.7 can' t install pip (trusty) #77

Closed SynneK1337 closed 5 years ago

SynneK1337 commented 5 years ago

description

Hello. I can' t install pip on my ubuntu 14.04.

synnek@uw467:~/librus-synchro$ python3.7 get-pip.py
Traceback (most recent call last):
  File "get-pip.py", line 20890, in <module>
    main()
  File "get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 119, in bootstrap
    import setuptools  # noqa
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 12, in <module>
    from setuptools.extension import Extension
  File "/usr/lib/python3/dist-packages/setuptools/extension.py", line 7, in <module>
    from setuptools.dist import _get_unpatched
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 16, in <module>
    import pkg_resources
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1479, in <module>
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

While python3-pip from repo is installed:

synnek@uw467:~/librus-synchro$ python3.7 -m pip
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 59, in <module>
    from pip.log import logger
  File "/usr/lib/python3/dist-packages/pip/log.py", line 9, in <module>
    import colorama, pkg_resources
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/share/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 1479, in <module>
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

Everything works with python3.4 from repository

os information

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

uname -a

Linux uw467 2.6.32-openvz-042stab125.5-amd64 #1 SMP Tue Oct 17 12:50:17 MSK 2017 i686 athlon i686 GNU/Linux
asottile commented 5 years ago

even if this did work, you wouldn't be able to install pip because _ssl is not provided on trusty because trusty is too old (see #63)

I'd suggest using a newer operating system than trusty which end-of-lifes in 4 months

I can confirm this works with xenial (16.04) which is our oldest supported distribution for python3.7

asottile commented 5 years ago

actually now that I look at the stacktrace, this is because you have too-old setuptools, I'd suggest trying to use virtualenv instead