问题:使用from pylab import *时出错:ImportError: No module named pylab
解决:未安装matplotlib模块
方法:
sudo apt-get install python-matplotlib
注:网上还有说需要安装python-numpy和python-scipy的
参考:http://www.lxway.com/169148224.htm
问题:使用from pylab import *时出错:ImportError: No module named pylab
解决:未安装matplotlib模块
方法:
sudo apt-get install python-matplotlib
注:网上还有说需要安装python-numpy和python-scipy的
参考:http://www.lxway.com/169148224.htm
问题:使用supervisord管理rq队列进程时,启动不起来,报FATAL Exited too quickly (process log may have details)的错误
解决:配置文件出错
方法:
一、在配置文件中添加redirect_stderr=true,将错误信息重定向到日志文件中
二、此时会发现报错RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.等等信息,这是因为使用python3的原因,导致编码出现问题
在配置文件中添加environment=LC_ALL="C.UTF-8",LANG="C.UTF-8"
下面是我的最终配置文件
[program:rq]
user=qingcheng
command=/alidata/www/dongman/website/.venv/bin/rqworker --path /alidata/www/dongman/website/jobs
redirect_stderr=true
stdout_logfile=/alidata/www/dongman/website/logs/rq_stdout.log
environment=LC_ALL="C.UTF-8",LANG="C.UTF-8"
问题:安装redis时出现错误:You need tcl 8.5 or newer in order to run the Redis test.
解决:安装tc8.6版本
方法:
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz sudo tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/ cd /usr/local/tcl8.6.1/unix/ sudo ./configure sudo make sudo make install
问题:由于ubuntu服务器时间与北京时间不同步,导致出错,需要将服务器时间进行同步
解决:使用ntpdate命令
方法:
一、查看时间:date
二、更改时间:sudo ntpdate -u ntp.api.bz
三、查看更改后的时间:date
注:ntp常用服务器:
中国国家授时中心:210.72.145.44(本人测试,此服务器不行)
NTP服务器(上海) :ntp.api.bz
参考:http://blog.csdn.net/bbirdsky/article/details/20445385
如果上面方法仍不行,报错no server suitable for synchronization found,那就用rdate吧
rdate -s time-b.nist.gov
当然先前需要sudo apt-get install rdate
问题:如何安装配置supervisor 如何配置nginx反代理到多个tornado服务器 如何使用tornado作为django服务器
解决:
参考:http://www.unjeep.com/q/42226591.htm(使用Tornado+Nginx部署Django的一种尝试)