ubuntu 无桌面 使用笔记

1、配置虚拟环境

(1)查看当前python版本

系统默认python2,已经安装了python3

(2)安装虚拟环境

https://blog.csdn.net/Diana_Z/article/details/89489927

效果非常完美,没有报错,棒棒哒

2、配置chromedricer

(1)安装google浏览器

https://blog.csdn.net/Diana_Z/article/details/89474991

(2)安装driver

https://blog.csdn.net/Diana_Z/article/details/89468491

(3)报错1

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.15.0-45-generic x86_64)

解决方法

https://blog.csdn.net/zhangpeterx/article/details/83502641

我参考这个方法,添加了参数“–no-sandbox”参数是让Chrome在root权限下跑

然后,并没有什么变化,我的chrom浏览器任旧无法启动

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值