Instapy: "no module named 'pyvirtualdisplay'"

Created on 3 Mar 2017  Â·  15Comments  Â·  Source: timgrossmann/InstaPy

C:\Users\Matt>python C:\Users\Matt\Desktop\InstaPy-master\quickstart.py
Traceback (most recent call last):
File "C:\Users\Matt\Desktop\InstaPy-master\quickstart.py", line 1, in
from instapy import InstaPy
File "C:\Users\Matt\Desktop\InstaPy-master\instapy__init__.py", line 1, in
from .instapy import InstaPy
File "C:\Users\Matt\Desktop\InstaPy-master\instapy\instapy.py", line 6, in
from pyvirtualdisplay import Display
ModuleNotFoundError: No module named 'pyvirtualdisplay'

Getting this error and, indeed, I can't find any pyvirtualdisplay file. Wut do?

Most helpful comment

@Arinerron I've got the same issue. How I solved the issue:
My problem was, that I had different versions of Python installed. Due to this, only the latest version of the Python which is installed on my server has included the needed Modules.

So what I did: Check the version of Python with:
python3 --version

If you get e.g. Python version 3.4.5, then you have to use in the commandline not only python, you have to use python3.4 (ignore the minor release number in the comment).

After knowing the latest installed version, I executed the setup like below:

  • Navigate to the InstaPy folder
  • Navigate to the subfolder scripts (cd scripts)
  • After being in the subfolder scripts, execute the setup.py with the the command: python3.4 setup.py install
  • Now the setup should complete without any error. If that's happen, you're all set.
  • Now go back to the InstaPy-Root-Folder and execute the quickstart with: python3.4 quickstart.py
  • Make sure, you have added your username and password into the quickstart. If your server only uses shell, so there's no GUI, you have also to set the "noGui"-variable, like described in: https://github.com/timgrossmann/InstaPy#running-it-with-docker

hope this helps.

All 15 comments

@Spiz Did you install it?

pip3.5 install pyvirtualdisplay
Note: You only need the virutaldisplay if you want to run it on a server. Maybe I'll remove that lines in the next update on master ;)

Whoops! Still new to python, thanks!

@Spiz That's no problem at all 😉

Hope everything is working fine now.
equirement already satisfied: pyvirtualdisplay in /usr/local/lib/python3.4/dist-packages
Requirement already satisfied: EasyProcess in /usr/local/lib/python3.4/dist-packages (from pyvirtualdisplay)

but it still says

ImportError: No module named pyvirtualdisplay

@Arinerron What machine are you running it on?

Using a server running Mint. I can use my main distro (Arch) if you think it has something to do with the OS. If you mean hardware, Intel Core i3 530 @ 4x 2.933GHz.

@Arinerron Hmm... I can't help you with that, sorry...
There are two guides for Ubuntu and CentOS

Mint is based on Ubuntu, so it should work. Uses same package manager too.

Sincerely,
Aaron E. (aka: arinerron)

This email and any files or media transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager. This message contains confidential information and is
intended only for the individual named. If you are not the
intended recipient, do not use, disclose or disseminate, distribute, or
copy this e-mail. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately dispose of this e-mail
from your system. If you are not the intended recipient you are notified
that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.

On Wed, May 31, 2017 at 12:51 PM, Tim Großmann notifications@github.com
wrote:

@Arinerron https://github.com/arinerron Hmm... I can't help you with
that, sorry...
There are two guides for Ubuntu and CentOS

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/timgrossmann/InstaPy/issues/10#issuecomment-305297672,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADvq4dZpkwrGEciIGrczzWYUAXUkMlF3ks5r_cTBgaJpZM4MSfZ8
.

@Arinerron I've got the same issue. How I solved the issue:
My problem was, that I had different versions of Python installed. Due to this, only the latest version of the Python which is installed on my server has included the needed Modules.

So what I did: Check the version of Python with:
python3 --version

If you get e.g. Python version 3.4.5, then you have to use in the commandline not only python, you have to use python3.4 (ignore the minor release number in the comment).

After knowing the latest installed version, I executed the setup like below:

  • Navigate to the InstaPy folder
  • Navigate to the subfolder scripts (cd scripts)
  • After being in the subfolder scripts, execute the setup.py with the the command: python3.4 setup.py install
  • Now the setup should complete without any error. If that's happen, you're all set.
  • Now go back to the InstaPy-Root-Folder and execute the quickstart with: python3.4 quickstart.py
  • Make sure, you have added your username and password into the quickstart. If your server only uses shell, so there's no GUI, you have also to set the "noGui"-variable, like described in: https://github.com/timgrossmann/InstaPy#running-it-with-docker

hope this helps.

Hello. I have the same problem on Ubuntu:
ImportError: No module named pyvirtualdisplay
And

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)

I solved this by installing it through

sudo pip install pyvirtualdisplay --user

Of course pip gotta use the version you've got, in case you don't know use the command

python --version or python3 --version and only use the first two numbers. For instance, if you've got 3.6.4, the command should be

sudo pip3.6 install pyvirtualdisplay --user.

You can even avoid using --user flag, but it's better passing it so that it will install the package to a user-owned directory. Your normal non-root user won't be able to access the files installed by sudo pip or sudo python.

If you have a Mac, in order to avoid that some dependencies won't be installed, you should use the command

sudo -H pip3.6 install pyvirtualdisplay

yo (pardon my french by the way im a french guy hope u will understand the following )
it seem its cause python version and pip version got incompatibilities :

python --version
and
pip --version to check it both

u certainly have pip 3. something (only the first number of the version is important)
and python 2.7 or else

to test in the terminal just enter :

python3 quickstart.py
instead of the simple :
python quickstart.py

I learnt python only 5 days ago so i didn't find solution for GUI if someone figure it out feel free to share :)

Thanks tim for that scripts by the way

python3 quickstart.py throw me session exception, by using sudo sudo python3 quickstart.py works well.

Traceback (most recent call last):
File "PhishX.py", line 32, in
from pyvirtualdisplay import Display
ModuleNotFoundError: No module named 'pyvirtualdisplay'

how to solve this problem

pip3.7 install pyvirtualdisplay
is not working..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ingorichter picture ingorichter  Â·  3Comments

neomh picture neomh  Â·  3Comments

Naramsim picture Naramsim  Â·  3Comments

46960 picture 46960  Â·  3Comments

converge picture converge  Â·  3Comments