Instapy: ModuleNotFoundError: No module named 'pyvirtualdisplay'

Created on 7 Oct 2017  路  23Comments  路  Source: timgrossmann/InstaPy

Hello,

Would some kind soul be willing to help me? I'm running Windows 10. The simple setup did not work so I'm using the advanced setup. In 3.1 "py get-pip.py" did not work. I'm not sure if it is related to the problem I'm going to mention.

So with the GUI, when I start the automation, the CMD window closes in a split second. I typed pause in the bat file to see what the message was and this is it:

D:\Users\Nav\Desktop\InstaPy-master>set PYTHONIOENCODING=UTF-8

D:\Users\Nav\Desktop\InstaPy-master>py quickstart.py
Traceback (most recent call last):
  File "quickstart.py", line 1, in <module>
    from instapy import InstaPy
  File "D:\Users\Nav\Desktop\InstaPy-master\instapy\__init__.py", line 1, in <module>
    from .instapy import InstaPy
  File "D:\Users\Nav\Desktop\InstaPy-master\instapy\instapy.py", line 8, in <module>
    from pyvirtualdisplay import Display
ModuleNotFoundError: No module named 'pyvirtualdisplay'

D:\Users\Nav\Desktop\InstaPy-master>pause
Press any key to continue . . .

I attempted to manually install pyvirtualdisplay, but it said that it is already installed:

D:\Users\Nav\Desktop\PyVirtualDisplay-0.2.1\pyvirtualdisplay>pip install pyvirtualdisplay
Requirement already satisfied: pyvirtualdisplay in c:\program files (x86)\python36\lib\site-packages
Requirement already satisfied: EasyProcess in c:\program files (x86)\python36\lib\site-packages (from pyvirtualdisplay)
help wanted

All 23 comments

I don't why y'all were so quick to close this. I made this post because I used the search and failed to find a solution. #675 gives me this:

D:\Users\Nav\Desktop\PyVirtualDisplay-0.2.1\pyvirtualdisplay>pip install pyvirtualdisplay
Requirement already satisfied: pyvirtualdisplay in c:\program files (x86)\python36\lib\site-packages
Requirement already satisfied: EasyProcess in c:\program files (x86)\python36\lib\site-packages (from pyvirtualdisplay)

Which I posted in the OP. I also followed #638 which told me to use the following to find the list of currently installed modules. pyvirtualdisplay is already on there.

C:>python.exe
help ("modules")

I then followed #10 and still it did not work. I even deleted the pyvirtualdisplay folder where it was located and successfully installed it again but the program still thinks there is no module.

@Indo-Scythian which python version are you using?

probably simply doing pip3.5 or pip3.6 install xxxxxxx will solve the problem

Getting the same issue, not sure what's happening?
Running: pip3.5 install pyvirtualdisplay, gives:
````
Requirement already satisfied: pyvirtualdisplay in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: EasyProcess in /usr/local/lib/python3.5/dist-packages (from pyvirtualdisplay)

@amaanr try

python3.5 quickstart.py

(if your setup is at quickstart.py)

hi,
no gui mode works like a charm, but gui version is having this pyvirtualdisplay error
i tried pip3.5 install pyvirtualdisplay pip3 install pyvirtualdisplay and pip install pyvirtualdisplay all tell me that it is installed

how can i get this fixed? any clue?
thxx for your help

best regards

@nocomp what does python --version and pip --version shows ?

hi,
thxx for your reply
here is what i have
nocomp@ubuntu:~/InstaPy$ pip --version
pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)
nocomp@ubuntu:~/InstaPy$

nocomp@ubuntu:~/InstaPy$ python --version
Python 2.7.12
nocomp@ubuntu:~/InstaPy$

i run the quickstart.py using python3.5

would be great to find a fix, using last ubuntu version 16.04
thxx a lot

when you say gui version, are you referring to this https://github.com/ahmadudin/electron-instaPy-GUI ? or nogui=False ?

I don't know exactly where the issue is, for me, people were using pip (to python2) and python (python3), but now I can see you're doing it right using the same version when using python3 and installing modules using pip (pip3).

Have you tried upgrade the package ? pip install pyvirtualdisplay -U

what happen if you try:

python3.5 <enter>
import pyvirtualdisplay

If you want, Im at our slack workspace (link at readme)

hi,
this is what i get
nocomp@ubuntu:~/InstaPy$ pip install pyvirtualdisplay -U
Requirement already up-to-date: pyvirtualdisplay in /usr/local/lib/python3.5/dist-packages
Requirement already up-to-date: EasyProcess in /usr/local/lib/python3.5/dist-packages (from pyvirtualdisplay)
nocomp@ubuntu:~/InstaPy$

i tried to import pyvirtualdisplay i get no error what so ever, but the gui version ( yes the one you posted the link) still gives me the pyvirtualdisplay error :'(

i am not a python expert, dunno what python version this gui is using :/
many thanks for your time and your help

is there a way to force python3.5 to be the default version to use?

@nocomp unfortunately I never used the GUI version before, I can't help.

It's quite simple, are you using Debian ? https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux

thxx a lot,
did the changes described in the link, and it worked
nocomp@ubuntu:~$ python --version
Python 3.5.2
nocomp@ubuntu:~$

but didn t fixed the gui issue :'(

@nocomp maybe GUI requires python 2.7 , pip2.7 install pyvirtualdisplay

here we go...
python2.7
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import pyvirtualdisplay
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named pyvirtualdisplay
install pyvirtualdisplay
File "", line 1
install pyvirtualdisplay
^
SyntaxError: invalid syntax

i think you are right :)

how do i install this module for 2.7 ?

thxx a again for your time

getting near, now miss selenium

after have install selenium, i get this :'(
Error: ImportError: No module named requests

raaaaaaaaaaaaaaaa

question, running in cli mode, used to work fine, but now all pictures gets labeled "INFO - --> Image not liked: Inappropriate" and when i llok at the picture, looks fine to me, any idea what can go wrong?
here is my code:

session.like_by_tags(['fpv', 'fpvlife', 'fpvracing', 'fpvaddiction', 'fpvracer', 'fpvaddict', 'fpvwing', 'android', 'androidography', 'sector9', 'argonay', 'drone', 'uav', 'patrouilledefrance', 'downhillskateboarding'], amount=200, media='Photo')

used to work fine

@nocomp pls, paste all your quickstart.py file (without passwd)

here we go, thxx a lot

session.login()

session.set_dont_like([''])
session.like_by_tags(['fpv', 'fpvlife', 'fpvracing', 'fpvaddiction', 'fpvracer', 'fpvaddict', 'fpvwing', 'android', 'androidography', 'sector9', 'argonay', 'drone', 'uav', 'patrouilledefrance', 'downhillskateboarding'], amount=200 )

session.like_by_tags(['android', 'androidography', 'androidonly', 'androidographer', 'photooftheday', 'pictureoftheday'], amount=200,)

session.follow_user_followers(['name1', 'name2', 'name3'], amount=50, randomize=False, sleep_delay=60)

session.end()

remove the set_dont_like line will fix it.

oh weird, i think it has been added by the gui mode, never wanted to have this.
i ve removed it and it still doesn t work.
does it work for you?
can you add sleep time also for session.like_by_tags ?
is there a possibility to scheddule it too?

thxx for your help

i ve removed this and now it works

session.like_by_tags(['android', 'androidography', 'androidonly', 'androidographer', 'photooftheday', 'pictureoftheday'], amount=200,)

session.follow_user_followers(['name1', 'name2', 'name3'], amount=50, randomize=False, sleep_delay=60)

weird no?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

n0sw34r picture n0sw34r  路  3Comments

harrypython picture harrypython  路  3Comments

drcyber975 picture drcyber975  路  3Comments

ediooo picture ediooo  路  3Comments

tibor picture tibor  路  3Comments