How to install PhantomJS for use with Python Selenium on the Raspberry Pi?

后端 未结 3 1330
别跟我提以往
别跟我提以往 2021-02-08 17:22

I want to run a Python script using Selenium WebDriver with PhantomJS as a headless browser on my Raspberry Pi running Raspbi

3条回答
  •  孤独总比滥情好
    2021-02-08 18:03

    Here's how I did it :

    For 64-bit system, download phantomjs-1.9.7-linux-x86_64.tar.bz2 (12.6 MB).
    For 32-bit system, download phantomjs-1.9.7-linux-i686.tar.bz2 (12.9 MB).
    
    Step 1> $ wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
    
    Step 2> $ tar -xvf phantomjs-1.9.7-linux-x86_64.tar.bz2
    
    Step 3> $ cd phantomjs-1.9.7-linux-x86_64
    
    Step 4> $ cd bin
    
    Step 5> $ sudo cp phantomjs /usr/bin
    
    To check phantomjs installed properly perform the following step : 
    
    Step 6> $ phantomjs -h
    
    To install the dependencies on Red Hat based systems:
    
    Step 7> $ sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6
    

提交回复
热议问题