question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install pip for python3.6 on Linux 32bits : AttributeError

See original GitHub issue

Environment

  • pip version: Not yet installed for python3.6
  • Python version: Python 3.6.5 :: Anaconda, Inc.
  • OS: Ubuntu 14.04.6 LTS 32 bits

Description get-pip.py script fails to install pip for python3.6 on Ubuntu 14.04.6 LTS 32bits.

Expected behavior The installation of pip should be successful and the pip module should be installed into /usr/local/lib/python3.6/dist-packages/pip

How to Reproduce

  1. wget https://bootstrap.pypa.io/get-pip.py
  2. sudo python3.6 get-pip.py

Output

Traceback (most recent call last):
  File "get-pip.py", line 21492, 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'

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, Jul 20, 2019
2\. sudo python3.6 get-pip.py

Don’t sudo install it.

You’d want to do: python3.6 get-pip.py -- --user

0reactions
sebmacommented, Aug 12, 2019

@chrahunt Hi, here are the anwsers to your questions :

$ which python3.6
/usr/bin/python3.6
$ type python3.6
python3.6 is /usr/bin/python3.6
$ python3.6 -c 'import sys; print(sys.executable); print(sys.path)'
/usr/bin/python3.6
['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']
$ dpkg -S /usr/lib/python3/dist-packages/setuptools/__init__.py /usr/lib/python3/dist-packages/pkg_resources.py
python3-setuptools: /usr/lib/python3/dist-packages/setuptools/__init__.py
python3-pkg-resources: /usr/lib/python3/dist-packages/pkg_resources.py
Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading python3.4 to python3.6 on ubuntu breaks pip
First, install pip for Python3.x (for some weird reason I didn't have it...) $ sudo apt-get install python3-pip.
Read more >
Installation — CuPy 11.4.0 documentation
If you have multiple versions of CUDA Toolkit installed, CuPy will automatically choose one of the CUDA installations. See Working with Custom CUDA ......
Read more >
How to install pip for Python 3.6 on Ubuntu 16.10?
I got a clear Ubuntu 16.10 image from the official docker store. · Run apt-get update · Run apt-get install python3.6 · Run...
Read more >
3. Configure Python — Python 3.11.1 documentation
configure script options using: See also the Misc/SpecialBuilds.txt in the Python source distribution. General Options: WebAssembly Options: Install ...
Read more >
buildozer - PyPI
Note that only Python 3 is supported. ... Installing Buildozer with target Python 3 (default): ... cant able to build apk on linux...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found