Problems with Functools

Answered

Hi

Does PyCharm install Functools when it is installed?

I'm new to Python, and having huge problems with Functools.

If I Import functools and run, I get:

Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\pydevd.py", line 11, in <module>
import traceback
File "C:\Users\Henrik\Anaconda3\lib\traceback.py", line 5, in <module>
import linecache
File "C:\Users\Henrik\Anaconda3\lib\linecache.py", line 11, in <module>
import tokenize
File "C:\Users\Henrik\Anaconda3\lib\tokenize.py", line 33, in <module>
import re
File "C:\Users\Henrik\Anaconda3\lib\re.py", line 122, in <module>
import enum
File "C:\Users\Henrik\Anaconda3\lib\enum.py", line 3, in <module>
from functools import reduce
ImportError: cannot import name 'reduce'

 

I can how ever chose the line, and run it in the python console with no problems.

 

I have never installed functools, but it is referenced maybe 20 places in my libs and site-packages. Several of these references is of a file type that is associated with PyCharm. When I try to run these PyCharm associated files, the also fail.

 

Have been stuck for 2 days now, and no one in the entire Internet, seems to know anything about this problem :-) Some say to uninstall functools, but I never installed it, at it is not on my Conda or PIP list. SOme say to manually delete every file that has functools in the name, but that doesn't seem to do anything, and there is still a bunch of fills name functoolz left anyway.

 

I'm about to give up on PyCharm and Python al together. Lost almost 2 whole days of work because of this now. Have my code up and running, but only by highlighting it, and choosing "Execute in console". Then everything works

Help Obi Wan , you are truly my only hope

0
2 comments

Hi,

What happens if you run your script using the same interpreter as in Pycharm from the command line? Do you have the same error? Also please feel free to contact pycharm-support@jetbrains.com with screenshots to make our communication faster/easier.

0
Avatar
Permanently deleted user

Thank you for responding Anna :-)

I did get the same error when running it in the command line yes, but now I gave up, removed everything relating to Python on my machine, and reinstalled it all again,,,,,,,,,,,,,,,,,,,, now it is WORKING :-D

I'm tired and happy :-)

Hope you have a wonderful weekend

0

Please sign in to leave a comment.