limejs int步骤安装问题与关闭 [英] limejs int step installation issue with closure
问题描述
我已经在Windows 7上安装了gitbash.
I already has gitbash on windows 7.
我安装了Python,还将环境路径添加到C:/python33
I installed Python, also added Environment path to C:/python33
克隆limejs之后.当从limejs基础输入第三步时. https://github.com/digitalfruit/limejs
After cloning limejs. When type the 3rd step from limejs basics. https://github.com/digitalfruit/limejs
我收到以下错误消息.
Welcome to Git (version 1.8.3-preview20130601)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
lenovo@BMI-AJINKYA /d/limejs (master)
$ python --version
Python 3.3.2
lenovo@BMI-AJINKYA /d/limejs (master)
$ python bin/lime.py --help
Usage: lime.py [command] [options]
Commands:
init Check lime dependecies and setup if needed
update Update Closure dependency file. Need to run every time you
change goog.provide() or goog.require()
create [path/name] Setup new project [name]
gensoy [path] Convert all *.soy files under path to *.soy.js files
build [name] Compile project to single Javascript file
Options:
-h, --help show this help message and exit
-a, --advanced Build uses ADVANCED_OPTIMIZATIONS mode (encouraged)
-e EXTERNS_FILE, --externs=EXTERNS_FILE
File with externs declarations.
-o OUTPUT, --output=OUTPUT
Output file for build result
-m, --map Build result sourcemap for debugging. Also turns on
pretty print.
-s, --use-strict Use EcmaScript5 strict mode.
-p PRELOAD, --preload=PRELOAD
Generate preloader code with given callback as start
point.
-d DEFINE, --define=DEFINE
Define custom variable accessible before build.
lenovo@BMI-AJINKYA /d/limejs (master)
$ bin/lime.py init
Closure Library not found. Downloading to D:\limejs\closure
Please wait...
Cloning into 'D:\limejs\closure'...
remote: Counting objects: 43590, done.
remote: Finding sources: 100% (43590/43590), done.
remote: Total 43590 (delta 35039)
Receiving objects: 100% (43590/43590), 17.23 MiB | 265.00 KiB/s, done.
Resolving deltas: 100% (35039/35039), done.
Checking out files: 100% (1884/1884), done.
Box2DJS not found. Downloading to D:\limejs\box2d
Please wait...
Cloning into 'D:\limejs\box2d'...
remote: Counting objects: 2250, done.
remote: Compressing objects: 100% (1172/1172), done.
emote: Total 2250 (delta 1092), reused 2222 (delta 1065)
Receiving objects: 100% (2250/2250), 1.01 MiB | 268.00 KiB/s, done.
Resolving deltas: 100% (1092/1092), done.
Downloading Closure Compiler:
100%
Unzipping...
Cleanup
Downloading Closure Templates(Soy):
100%
Unzipping...
Cleanup
Updating Closure deps file
python D:\limejs\closure\closure/bin/build/depswriter.py --root_with_prefix="D:\
limejs\closure/ ../../" --root_with_prefix="D:\limejs\lime/ ../../../lime/" --ro
ot_with_prefix="D:\limejs\box2d/src/ ../../../box2d/src/" --output_file="D:\lime
js\closure\closure/goog/deps.js"
Traceback (most recent call last):
File "D:\limejs\closure\closure/bin/build/depswriter.py", line 202, in <module
>
main()
File "D:\limejs\closure\closure/bin/build/depswriter.py", line 178, in main
path_to_source.update(_GetRelativePathToSourceDict(root, prefix=prefix))
File "D:\limejs\closure\closure/bin/build/depswriter.py", line 145, in _GetRel
ativePathToSourceDict
path_to_source[prefixed_path] = source.Source(source.GetFileContents(path))
File "D:\limejs\closure\closure\bin\build\source.py", line 119, in GetFileCont
ents
return fileobj.read()
File "c:\Python33\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 7027: cha
racter maps to <undefined>
lenovo@BMI-AJINKYA /d/limejs (master)
$
推荐答案
我已修复它.我卸载了Python 3.3,并安装了Python 2.7.
I fixed it. I uninstall Python 3.3 and installed Python 2.7.
问题是Python 3.x使用系统的默认编码自动将文本文件解码为Unicode,这可能会导致错误.
Problem was Python 3.x decodes text files automatically to Unicode using system's default encoding, which may be causing the error.
在安装Python 2.7时,我没有编译错误,而且limejs helloworld示例现在可以正常工作.
Installing Python 2.7, i get no compiling errors as well limejs helloworld example works fine now.
这篇关于limejs int步骤安装问题与关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!