-1

I installed Python 3.7.5 and later 3.7.6, the same story. I need to install Pwin32, numpy, but can't do it. I keep getting the error below. Installing on a virtual machine, same OS win10 1806, everything works fine.

   D:\AAA\Python\Scripts>pip

   *Traceback (most recent call last):
   File "d:\aaa\python\lib\runpy.py", line 193, in _run_module_as_main
   "__main__", mod_spec)
   File "d:\aaa\python\lib\runpy.py", line 85, in _run_code
   exec(code, run_globals)
   File "D:\AAA\Python\Scripts\pip.exe\__main__.py", line 2, in <module>
   File "d:\aaa\python\lib\re.py", line 143, in <module>
   class RegexFlag(enum.IntFlag):
   AttributeError: module 'enum' has no attribute 'IntFlag'*

The OS is WIndows 10 version 1909 Any suggestion is much appreciated, I looked on the web, still have no clue why this is happening. thanks

Ahmet
  • 7,527
  • 3
  • 23
  • 47
  • https://stackoverflow.com/search?q=%5Bpip%5D+AttributeError%3A+module+%27enum%27+has+no+attribute+%27IntFlag%27 – phd Aug 04 '20 at 18:23

1 Answers1

1

Are you sure you're running the python version you think you are? How are you running pip?

Did you follow the steps in the official guide?

If pip isn’t already installed, then first try to bootstrap it from the standard library:

python -m ensurepip --default-pip If that still doesn’t allow you to run pip:

Securely Download get-pip.py

Run python get-pip.py. This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.

Jeremy
  • 661
  • 7
  • 19