as3:~/ngokevin-site# nano content/blog/20140114_test-chinese.mkd
as3:~/ngokevin-site# wok
Traceback (most recent call last):
File "/usr/local/bin/wok", line 4, in
Engine()
File "/usr/local/lib/python2.7/site-packages/wok/engine.py", line 104, in init
self.load_pages()
File "/usr/local/lib/python2.7/site-packages/wok/engine.py", line 238, in load_pages
p = Page.from_file(os.path.join(root, f), self.options, self, renderer)
File "/usr/local/lib/python2.7/site-packages/wok/page.py", line 111, in from_file
page.meta['content'] = page.renderer.render(page.original)
File "/usr/local/lib/python2.7/site-packages/wok/renderers.py", line 46, in render
return markdown(plain, Markdown.plugins)
File "/usr/local/lib/python2.7/site-packages/markdown/init.py", line 419, in markdown
return md.convert(text)
File "/usr/local/lib/python2.7/site-packages/markdown/init.py", line 281, in convert
source = unicode(source)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position …Run Code Online (Sandbox Code Playgroud) 我使用以下命令从源编译Python:
wget http://python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2
tar jxvf Python-2.6.6.tar.bz2
cd Python-2.6.6
./configure
make
make install
Run Code Online (Sandbox Code Playgroud)
Python版本:
as3:~# python -V
Python 2.6.6
Run Code Online (Sandbox Code Playgroud)
我也安装了pip安装程序但是当我使用时pip install xxx,我总是收到以下错误:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.6/site-packages/distribute-0.6.49-py2.6.egg/pkg_resources.py", line 16, in <module>
import sys, os, time, re, imp, types, zipfile, zipimport
ImportError: No module named time
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
我成功编译了mercurial,如下:...
copying build/scripts-2.7/hg -> /usr/local/bin
changing mode of /usr/local/bin/hg to 755
running install_egg_info
Writing /usr/local/lib/python2.7/site-packages/mercurial-2.8.1-py2.7.egg-info
as3:~/mercurial-2.8.1# cd ~
as3:~# hg clone http://hg.cat-v.org/werc/
Traceback (most recent call last):
File "/usr/bin/hg", line 25, in <module>
mercurial.util.set_binary(fp)
File "/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py", line 103, in __getattribute__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'set_binary'
as3:~#
Run Code Online (Sandbox Code Playgroud)
如何修复它?谢谢。我的Python版本:2.7.6