Debian wheezy
Selenium
Phantom.js
PyVirtualDisplay
I simply installed and tested Selenium and Phantom.js, but it didn't seem to run with no errors.
An error occurs when only Phantom.js is executed
phantomjs QXcbConnection Could not connect to display
It seems that it came out because it can not even draw in the first place because it is an environment without a desktop. If you look it up, you will find:
Python - Taking Browser Screenshots With No Display (Selenium/Xvfb)
I installed xvfb and PyVirtualDisplay and confirmed that phantom.js works normally. No problem from python via PyVirtualDisplay.
Phantom.js was up to apt in Debian phantomjs_2.1.1
Since the environment is created properly, it can't be helped because it's dirty. Should I use pyenv or a container?
Recommended Posts