Instapy: No module named 'fcntl'

Created on 28 May 2019  路  20Comments  路  Source: timgrossmann/InstaPy

After installing Instapy with pip install instapy everything seemed to be fine. I got no error messages during installation.
When I want to execute the quickstart file with python quickstart.py I get an error message saying this:

No module named 'fcntl'

Does anyone know a solutin for this?

Operating system is Windows 10 with the latest Python installation and the environmental variables(PATH) are also set to the Python folder.

Current Behavior

C:\Users\simon\Documents\InstaPy-master\InstaPy-master>python quickstart.py Traceback (most recent call last): File "quickstart.py", line 2, in <module> from instapy import InstaPy File "C:\Users\simon\Documents\InstaPy-master\InstaPy-master\instapy\__init__.py", line 3, in <module> from .instapy import InstaPy File "C:\Users\simon\Documents\InstaPy-master\InstaPy-master\instapy\instapy.py", line 15, in <module> from pyvirtualdisplay import Display File "C:\Users\simon\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyvirtualdisplay\__init__.py", line 3, in <module> from pyvirtualdisplay.display import Display File "C:\Users\simon\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyvirtualdisplay\display.py", line 1, in <module> from pyvirtualdisplay.abstractdisplay import AbstractDisplay File "C:\Users\simon\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyvirtualdisplay\abstractdisplay.py", line 9, in <module> import fcntl ModuleNotFoundError: No module named 'fcntl'

InstaPy configuration

```# imports
from instapy import InstaPy
from instapy import smart_run

login credentials

insta_username = ''
insta_password = ''

comments = ['Nice shot! @{}',
'I love your profile! @{}',
'Your feed is an inspiration :thumbsup:',
'Just incredible :open_mouth:',
'What camera did you use @{}?',
'Love your posts @{}',
'Looks awesome @{}',
'Getting inspired by you @{}',
':raised_hands: Yes!',
'I can feel your passion @{} :muscle:']

get an InstaPy session!

set headless_browser=True to run InstaPy in the background

session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)

with smart_run(session):
""" Activity flow """
# general settings
session.set_dont_include(["friend1", "friend2", "friend3"])

# activity
session.like_by_tags(["natgeo"], amount=10)

# Joining Engagement Pods
session.set_do_comment(enabled=True, percentage=35)
session.set_comments(comments)
session.join_pods()

```

wontfix

Most helpful comment

I was able to fix this by putting the code from this StackOverflow answer into a python file named fcntl.py and dropping it into the same directory as the quickstart files. Note this is a hack and this should still be addressed.

https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

All 20 comments

Have the same problem here.. if I'll find a solutions I let you know.

Same here - tried several installs - same issue?

any solutions for this?

Same

I was able to fix this by putting the code from this StackOverflow answer into a python file named fcntl.py and dropping it into the same directory as the quickstart files. Note this is a hack and this should still be addressed.

https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

Thank you! I tried too and it works.

it works thanks mate

Same here. Thanks!

hey guys i still dont know how to do that im new to coding and i dont know how to do it can someone help me

@locolab Please email me or share with us the file you fcntl.py because the link provided in the guide not valid... What exact steps need to be done to solve this? please help me

I was able to fix this by putting the code from this StackOverflow answer into a python file named fcntl.py and dropping it into the same directory as the quickstart files. Note this is a hack and this should still be addressed.

https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

Thanks that worked perfectly

@oseferi What is your Discord or mail? I would like to get your help with this...

i did it thanks it works like a charm

@oseferi What is your Discord or mail? I would like to get your help with this...

hi you can write me at this address [email protected]

It works. Thank you!

I was able to fix this by putting the code from this StackOverflow answer into a python file named fcntl.py and dropping it into the same directory as the quickstart files. Note this is a hack and this should still be addressed.

https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

I was able to fix this by putting the code from this StackOverflow answer into a python file named fcntl.py and dropping it into the same directory as the quickstart files. Note this is a hack and this should still be addressed.
https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

Thanks that worked perfectly

Awesome person. helped me a lot +1 rep.

I am attempting to solve this issue as well. I placed the fcnt1.py file in the InstaPy folder on my desktop along with the quickstart.py file and it is still not working. could you further explain to me the location where I should place the file if this is not correct? It still says the same thing. I sourced the contents of the file from the Stack Overflow link paragraph

@Bodhi-King make sure you are using the "l" character and not the number "1" in the file name.

The file name should be "fcntl.py" and NOT "fcnt1.py".

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

@Bodhi-King make sure you are using the "l" character and not the number "1" in the file name.

The file name should be "fcntl.py" and NOT "fcnt1.py".

I have ModuleNotFoundError: No module named 'pwd' after that. Do you know how to fix this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Flaunkerton2395 picture Flaunkerton2395  路  48Comments

awesome205 picture awesome205  路  71Comments

EvraCloak picture EvraCloak  路  60Comments

cormo1990 picture cormo1990  路  48Comments

GreatTimeBand picture GreatTimeBand  路  114Comments