Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.4k views
in Technique[技术] by (71.8m points)

Trouble updating/installing python(anaconda) after 3.6

Hello wizards (is that still how you call the coders?),

I've been trying to install anaconda on my computer for a little while now and I'm not having much success.

When I try "conda update" or any variant of that I get.

Traceback (most recent call last):
  File "C:UsersSten den Bakkeranaconda3Scriptsconda-script.py", line 11, in <module>
    from conda.cli import main
  File "C:UsersSten den Bakkeranaconda3libsite-packagesconda\__init__.py", line 11, in <module>
    from json import JSONEncoder
  File "C:UsersSten den Bakkeranaconda3libjson\__init__.py", line 106, in <module>
    from .decoder import JSONDecoder, JSONDecodeError
  File "C:UsersSten den Bakkeranaconda3libjsondecoder.py", line 3, in <module>
    import re
  File "C:UsersSten den Bakkeranaconda3lib
e.py", line 145, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Looking around the internet it seems that one of the problems that might be occuring is that I have a enum34 package installed somewhere that seems to be causing the problem.

I tried uninstalling all python from my computer and reinstalling anaconda several times but there is no change.

Many places recommend I try pip uninstall -y enum34 or some variation of that but that strangely also throws me:

Traceback (most recent call last):
  File "C:UsersSten den Bakkeranaconda3Scriptspip-script.py", line 3, in <module>
    import re
  File "C:UsersSten den Bakkeranaconda3lib
e.py", line 145, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

So I'm kinda at a loss. Another place recommended I try to check the enum with:

import enum
print(enum.__file__)  

But I don't quite know how to do this because the command prompt throws a "import is not recognized as an internal or external command, operable program or batch file." Another place said $ unset PYTHONPATH worked for them but the prompt throws the same "not recognized as an internal..." for $.

Any help would be really appreciated.

Thanks for reading


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...