我跟随this link,现在当我输入phan然后输入tab(\t)时,它会自动完成幻影JS。在

但是,如果我运行phantomJS -v或phantomJS --version,我得到:bash: /usr/local/bin/phantomjs: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

另外,如果我试着跑:

^{pr2}$

>>> import os

>>> driver = webdriver.PhantomJS(service_log_path=os.path.devnull)

Exception AttributeError: "'Service' object has no attribute 'log_file'" in > ignored

Traceback (most recent call last):

File "", line 1, in

File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 51, in __init__

self.service.start()

File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 69, in start

os.path.basename(self.path), self.start_error_message)

selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.

>>>

我的selenium/phatnomjs是否安装了正确的权限?在

我创建了一个目录/home/ec2-user/temp,并设置:chmod 777 /home/ec2-user/temp

但是>>> from selenium import webdriver

>>> driver = webdriver.PhantomJS(service_log_path='/home/ec2-user/temp/ghostdriver.log')

产量:Traceback (most recent call last):

File "", line 1, in

File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 51, in __init__

self.service.start()

File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 69, in start

os.path.basename(self.path), self.start_error_message)

selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.

如果我输入which phantomjs我得到:$ which phantomjs

/usr/local/bin/phantomjs

p5js可以在linux上运行吗,在linux上使用python运行phantomjs相关推荐

  1. python手机版怎么运行项目或脚本-详解python运行三种方式

    方式一 交互式编程 交互式编程不需要创建脚本文件,是通过 Python 解释器的交互模式进来编写代码. linux上你只需要在命令行中输入 Python 命令即可启动交互式编程,提示窗口如下: $ p ...

  2. python保存运行结果下次使用_将python运行结果保存至本地文件中的示例讲解

    一.建立文件,保存数据 1.使用python中内置的open函数 打开txt文件 #mode 模式 #w 只能操作写入 r 只能读取 a 向文件追加 #w+ 可读可写 r+可读可写 a+可读可追加 # ...

  3. python程序写完后点哪个运行快_让你的Python运行更快

    讨厌Python的人总是说,他们不想使用它的原因之一是它很 慢.嗯,特定程序(无论使用何种编程语言)是快还是慢,在很大程度上取决于编写该程序的开发人员以及编写优化而 快速的 程序的技能和能力 . 因此 ...

  4. python用什么运行环境_使用SAE部署Python运行环境的教程

    因为 GAE 在国内访问不便,所以平时有一些小应用,我都会放在 SAE 上面, 虽然 SAE 还有很多缺陷,但算是上手比较容易的一个了,最起码文档写的不错. 开发 SAE 上的应用,我一般都用 Fla ...

  5. vccode运行调试python_VSCODE安装以及使用Python运行调试代码的简单记录

    1. VScode安装 官网下载VSCODE https://code.visualstudio.com/ 下载呢windows的x64安装包,安装stable的版本 当前日期 2018.01.15 ...

  6. python是软件吗-python运行环境是什么

    1.准备好安装包 1)上python官网下载python运行环境(https://www.python.org/downloads/),目前比较稳定的是python-3.5.2 2)上pycharm官 ...

  7. python教程是什么-python运行环境是什么

    1.准备好安装包 1)上python官网下载python运行环境(https://www.python.org/downloads/),目前比较稳定的是python-3.5.2 2)上pycharm官 ...

  8. surface pro 3 linux,新闻|在Surface Pro 3上运行Ubuntu – 虽不完美但很有戏

    微软从5月21日起接受Surface Pro 3平板PC的预订,没过多久Linux爱好者们就在其上尝试了Ubuntu 14.04.结果是十分有戏的!Surface pro 3宣称其拥有还不错的硬件配置 ...

  9. Docker在Linux上运行NetCore系列(一)配置运行DotNetCore控制台

    Docker在Linux上运行NetCore系列(一)配置运行DotNetCore控制台 原文:Docker在Linux上运行NetCore系列(一)配置运行DotNetCore控制台 转发请注明此文 ...

  10. linux导出文件夹到u盘,Linux系统放到U盘上直接在U盘上运行Linux

    以下使用dos+grub4dos启动Ubuntulinux进入u盘目录,这种开启方法便于加入PE和dos工具箱制作多重启动盘. 优盘之家 1.引导dos启动 U盘之家 启动UltraISO,选择菜单& ...

最新文章

  1. 两下或多下回车造成数据库多次提交事物的解决方法
  2. Java网页数据采集器[下篇-数据查询]【转载】
  3. 用Enter键取代tab键
  4. Spring整合Redis时报错:java.util.NoSuchElementException: Unable to validate object
  5. 用GAN也可以P图,效果还不输PS | 英伟达出品
  6. python urllib.request 爬虫 数据处理-python爬虫之json数据处理
  7. GWT笔记(Google Web Toolkit)1
  8. android 调用.h文件,[Android Studio / NDK] 如何使用javah生成.h文件
  9. kgtemp文件转换mp3_amr转换mp3格式文件
  10. maven mockito_如何:测试Maven项目(JUnit,Mockito,Hamcrest,AssertJ)中的依赖项
  11. mysql索引类型 优劣_Mysql索引的类型和优缺点详解
  12. import itchat ModuleNotFoundError: No module named 'itchat'
  13. c语言中感叹号什么意思_啥是c语言-c语言感叹号用法-c语言中的/和%表示什么意思...
  14. noob的第一步——基于51单片机的指纹密码锁
  15. sin35 在C语言中怎么表示,sin35度等于多少
  16. python获取word页数_用程序获取word页码方法汇总
  17. 七轴分拣机器人设计与MATLAB仿真
  18. mac使用zsh终端环境变量配置无效的解决方案
  19. BGP路径属性与选路原则
  20. C语言鼠标操作方法及源码

热门文章

  1. JS 常用字符串数组遍历函数方法整理
  2. 四叶草社交平台——十天冲刺(5)
  3. Android小测验感受
  4. Java使用Redis实现分布式锁来防止重复提交问题
  5. scroll-view——小程序横向滚动
  6. [luoguP1029] 最大公约数和最小公倍数问题(数论)
  7. linux命令学习-4-lsof
  8. Yii框架 phpexcel 导出
  9. 大家好!欢迎来到我的博客!
  10. Activiti Explorer安装