from functools import reduce I'm using python 3.6.2, and this is the only code that shows the following error:
Traceback (most recent call last): File "D:\Pythons\oop.py", line 50, in <module> from functools import reduce ImportError: cannot import name 'reduce' Process returned 1 (0x1) execution time : 0.145 s I will find this problem because I made a mistake in another code,
from enum import Enum It reported the error:
Traceback (most recent call last): File "D:\Pythons\oop.py", line 50, in <module> from enum import Enum File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\enum.py", line 3, in <module> from functools import reduce ImportError: cannot import name 'reduce' So I just looked at the enum. Py source,Found in line 3
from functools import reduce Ladies and gentlemen, in centos7.2 installed python3.6.2 is completely out of any problems, but under the Windows 10 professional version installed, will appear these problems above, seems I installed out of the question, however, many times I've uninstalled, installed the many times repeatedly, still won't do, don't know without those documents, who can tell me how to through the command line in the Windows environment to install it?
reducefromfunctools. I can't find a class/method named reduce neither in python 3. github.com/python/cpython/blob/3.6/Lib/functools.py - this was in python 2 available docs.python.org/2/library/functools.html#functools.reducereduceis even listed on the documentation pagefunctools.pyin a location higher up on the path than the intended import. Rename the file you created calledfunctools.py. If this is not the case, then your installation is likely bad.