I initiated and close phantomjs
in Python with the following
from selenium import webdriver
driver = webdriver.PhantomJS()
driver.get(url)
h
Please note that this will obviously cause trouble if you have several threads/processes starting PhantomJS on your machine.
I've seen several people struggle with the same issue, but for me, the simplest workaround/hack was to execute the following from the command line through Python AFTER you have invoked driver.close()
or driver.quit()
:
pgrep phantomjs | xargs kill