Ask coding questions

← Back to all posts
InstaPy: AttributeError: module 'enum' has no attribute 'IntFlag'
joktay (1)

For some reason I'm not able to install instapy. Works fine in a Jupyter notebook but I need it to be hosted online.

I'm new at this. Does anyone know what's going wrong?

This is the error for reference:

[EnvCommandError]
Command ['/opt/virtualenvs/python3/bin/pip', 'install', '--no-deps', 'googleapis-common-protos==1.52.0'] errored with the following return code 1, and output:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/bin/pip", line 3, in <module>
import re
File "/usr/lib/python3.8/re.py", line 145, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

exit status 1

Repl.it: Package operation failed.

Comments
hotnewtop
DrSuave (0)

I'm having the same issue, InstaPy installs perfectly onto most other online hosting sites e.g. Python Anywhere, but throws this error. Looking at the enum.file location from ">import enum \n >print(enum.file)" the location of the standard location is "/usr/lib/python3.8/enum.py" on replit, therefore perhaps InstaPy is looking to install or use a different enum version. Locally this issue would have been solved by removing any instance of enum in the working directory, however the replit files scope shows no such enum.py instance. Im still waiting on some kind of answer. Thank You in advance.

RYANTADIPARTHI (6006)

Either the package is not available, or it's a bug. report it. but refresh and try again. maybe it will work then.