ssh连接ubuntu 并设置了virtualenv环境,运行报错!
laoxiaolin opened this issue · 8 comments
在win10的环境下运行正常,在ubuntu中运行失败:
ubuntu是用ssh进行连接
详情如下:
(qt5) python@python-HP-ProBook-4520s:~/projects/JD-Coin$ python app/main.py
2018-05-09 19:29:38,175 root[config] INFO: 使用配置文件 "config.json".
2018-05-09 19:29:38,175 root[config] WARNING: 配置文件不存在, 使用默认配置文件 "config.defaul
t.json".
2018-05-09 19:29:38,176 root[config] INFO: 用户名/密码未找到, 自动登录功能将不可用.
Traceback (most recent call last):
File "app/main.py", line 11, in
from job import jobs_all
File "/home/python/projects/JD-Coin/app/job/init.py", line 6, in
from .bean import Bean
File "/home/python/projects/JD-Coin/app/job/bean.py", line 1, in
from pyquery import PyQuery
ImportError: No module named 'pyquery'
执行过 pip install -r requirements.txt
报错。
你好,这是因为没装 PyQuery 报的错。执行 pip install -r requirements.txt 报的什么错呢?
我在本地的win10系统上,运行正常。
在远端ubuntu服务器上不行,执行 pip install -r requirements.txt 时没有报任何错误。
重新安装pyquery也不行。是不是因为ssh连接,导致权限不够。我不是太懂python pyqt5的运行机制。
问体应该是虚拟环境造成的。但是ssg远程连接的话,pyqt5不能运行。第二种方式,已经不建议使用,还有更好的办法吗?
pyqt可以在虚拟机上安装吗 如果可以 安装个xvfb
安装xvfb可以实习部分运行,但还是有报错,报错如下:
完全懵逼了,:(
python@python-HP-ProBook-4520s:~/projects/JD-Coin$ xvfb-run --server-args="-screen 0, 1024x7 68x24" python3 app/main.py
2018-05-10 12:31:53,841 root[config] INFO: 使用配置文件 "config.json".
2018-05-10 12:31:54,226 jobs[daka] INFO: Job Start: 京东客户端钢镚打卡
2018-05-10 12:31:54,391 jobs[daka] INFO: 登录状态: False
2018-05-10 12:31:54,392 jobs[daka] INFO: 进行登录...
[1:15:0510/123203.567833:ERROR:adm_helpers.cc(62)] Failed to query stereo recording.
[3194:3223:0510/123204.070578:ERROR:service_manager.cc(156)] Connection InterfaceProviderSpec prevented service: content_renderer from binding interface: blink::mojom::BudgetService exposed by: content_browser
[1:1:0510/123204.226244:ERROR:BudgetService.cpp(167)] Unable to connect to the Mojo BudgetService.
2018-05-10 12:32:08,188 jobs[daka] INFO: 登录成功
2018-05-10 12:32:08,277 jobs[daka_app] INFO: 今日已打卡: False
2018-05-10 12:32:08,452 jobs[daka_app] INFO: 打卡成功: True; Message: 签到获得0.04钢镚
2018-05-10 12:32:08,452 jobs[daka] INFO: Job End.
2018-05-10 12:32:08,453 jobs[daka] INFO: Job Start: 京东客户端签到领京豆
2018-05-10 12:32:08,569 jobs[daka] INFO: 登录状态: True
2018-05-10 12:32:08,778 jobs[bean_app] INFO: 今日已签到: False; 签到天数: 2; 现有京豆: 514
2018-05-10 12:32:08,921 jobs[bean_app] INFO: 签到成功: True; Message: 连签3天成功,获得10京豆
礼包
2018-05-10 12:32:08,921 jobs[daka] INFO: Job End.
2018-05-10 12:32:08,922 jobs[daka] INFO: Job Start: 京东会员页签到领京豆
2018-05-10 12:32:09,020 jobs[daka] INFO: 登录状态: False
2018-05-10 12:32:09,020 jobs[daka] INFO: 进行登录...
[1:16:0510/123210.790347:ERROR:adm_helpers.cc(62)] Failed to query stereo recording.
[3194:3223:0510/123211.582345:ERROR:service_manager.cc(156)] Connection InterfaceProviderSpec prevented service: content_renderer from binding interface: blink::mojom::BudgetService exposed by: content_browser
[1:1:0510/123211.633295:ERROR:BudgetService.cpp(167)] Unable to connect to the Mojo BudgetService.
[1:16:0510/123250.594856:ERROR:stunport.cc(88)] Binding request timed out from 0.0.
报错不影响吧 python能继续跑吗
前两个任务不影响,第三个任务:京东会员页签到领京豆,就执行不下去了。不知为啥。估计是机器配置的问题,感谢回答。