Skip to content

ImportError: No module named 'concurrent.futures' #65577

Closed

Description

@BillBergmann
BPO 21378
Nosy @ned-deily, @PCManticore

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2014-04-29.16:35:50.387>
created_at = <Date 2014-04-28.21:02:30.295>
labels = ['invalid', 'library', 'type-crash']
title = "ImportError: No module named 'concurrent.futures'"
updated_at = <Date 2014-04-29.16:35:50.386>
user = 'https://bugs.python.org/BillBergmann'

bugs.python.org fields:

activity = <Date 2014-04-29.16:35:50.386>
actor = 'Bill.Bergmann'
assignee = 'none'
closed = True
closed_date = <Date 2014-04-29.16:35:50.387>
closer = 'Bill.Bergmann'
components = ['Library (Lib)']
creation = <Date 2014-04-28.21:02:30.295>
creator = 'Bill.Bergmann'
dependencies = []
files = []
hgrepos = []
issue_num = 21378
keywords = []
message_count = 4.0
messages = ['217418', '217420', '217422', '217529']
nosy_count = 3.0
nosy_names = ['ned.deily', 'Claudiu.Popa', 'Bill.Bergmann']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue21378'
versions = ['Python 3.4']

Activity

  1. BillBergmann commented on Apr 28, 2014

    BillBergmannmannequin
    MannequinAuthor

    python 3.4 attempting to run example at https://docs.python.org/3/library/concurrent.futures.html
    17.4.2.1

    $ python3 17_4_2.py 
    Traceback (most recent call last):
      File "<frozen importlib._bootstrap>", line 2195, in _find_and_load_unlocked
    AttributeError: 'module' object has no attribute '__path__'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "17_4_2.py", line 1, in <module>
        import concurrent.futures
    ImportError: No module named 'concurrent.futures'; 'concurrent' is not a package

    os: OS X 10.6

    from $env:
    PATH=/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin: ...

    PYTHONPATH=/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/: ...

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-crashA hard crash of the interpreter, possibly with a core dump
    on Apr 28, 2014
  3. PCManticore commented on Apr 28, 2014

    PCManticoremannequin
    Mannequin

    Do you have a module/file named concurrent.py in your PATH?

  4. ned-deily commented on Apr 28, 2014

    @ned-deily
    Member

    FWIW, works for me using the python.org 3.4 64-bin installer. What is the output of:

    python3 -c 'import sys;print(sys.version)'

    As Claudiu suggests, check for a concurrent.py shadowing the standard library version.

    Also, why are you setting PYTHONPATH to include /Library/Frameworks/Python.framework/Versions/{3.4,2.7}/lib/python3.4/site-packages/? Those are the standard locations for site-packages are included automatically in sys.path by the respective interpreters. Setting PYTHONPATH should not normally be needed.

  5. BillBergmann commented on Apr 29, 2014

    BillBergmannmannequin
    MannequinAuthor

    Thank you for your response. The program works as expected.

    I removed PYTHONPATH settings for 3.4 and 2.7. I'm not sure how those settings were written. I suspect something related to virtualenv, and I will be watching to see if they are written again.

    When I removed those paths, an error message pointed me to a local version of concurrent.py from tornado that was shadowing the concurrent.py in the python3.4 site-packages.

  6. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions