Ask coding questions

← Back to all posts
InstaPy: AttributeError: module 'enum' has no attribute 'IntFlag'

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:

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/", line 145, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

exit status 1 Package operation failed.


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/" 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 instance. Im still waiting on some kind of answer. Thank You in advance.


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