Ask coding questions

← Back to all posts
Help with Instapy

I am trying to run with Replit a code that uses the InstaPy library, for a simple follow/unfollw function. I altready tested my code, but i have problems installing here the library. (Tell me if i am doing right) Usually I create a repl, import my file and simply click on RUN button, because it's said that if i write in the code "import instapy" replit is gonna start the library download by itself. The problem is that in the download, after some time, occurs an error "module 'enum' has no attribute 'IntFlag'".
What should I do? if i download the library from the shell using "pip install instapy" and the "python" it starts the code all right but closing the site it stops to work.


can we get the code/repl for clarification.

if using replit, which I don't think you are bc u don't have any repls, make sure the file in command should be named

module 'enum' has no attribute 'IntFlag'

It's because your enum is not the standard library enum module. You probably have the package enum34 installed. delete enum34 if its installed and by default you will have enum in your code upon importing.

or try doing from enum import IntFlag and check.


@OldWizard209 Ok, now you can see my repl i think. The problem is that enum34 is automatically installed by instapy while running, and after the failed installation, i can't uninstall it because it doesn' result installed