You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: No module named 'concurrent.futures' #65577
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=Noneclosed_at=<Date2014-04-29.16:35:50.387>created_at=<Date2014-04-28.21:02:30.295>labels= ['invalid', 'library', 'type-crash']
title="ImportError: No module named 'concurrent.futures'"updated_at=<Date2014-04-29.16:35:50.386>user='https://bugs.python.org/BillBergmann'
$ python3 17_4_2.py
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 2195, in _find_and_load_unlockedAttributeError: '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: ...
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.
BillBergmann commented on Apr 29, 2014
BillBergmannmannequin
MannequinAuthor
More actions
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.
Activity
BillBergmann commentedon Apr 28, 2014
python 3.4 attempting to run example at https://docs.python.org/3/library/concurrent.futures.html
17.4.2.1
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/: ...
PCManticore commentedon Apr 28, 2014
Do you have a module/file named concurrent.py in your PATH?
ned-deily commentedon Apr 28, 2014
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.
BillBergmann commentedon Apr 29, 2014
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.