我正在尝试从nodeenv
内安装virtualenv
,但有些事情非常糟糕。我正在运行Debian 7(Wheezy)。
这就是我所做的:
virtualenv --system-site-packages ENV
source ENV/bin/activate
(ENV) pip install nodeenv
(ENV) nodeenv NODEENV
作为回应,我收到以下消息:
* Install node (4.0.0)..
......它被困在那里约10分钟,然后诅咒:
File "/home/bob/Documents/Projects/xyz/ENV/bin/nodeenv", line 9, in <module>
load_entry_point('nodeenv==0.13.6', 'console_scripts', 'nodeenv')()
File "/home/bob/Documents/Projects/xyz/ENV/local/lib/python2.7/site-packages/nodeenv.py", line 891, in main
create_environment(env_dir, opt)
File "/home/bob/Documents/Projects/xyz/ENV/local/lib/python2.7/site-packages/nodeenv.py", line 732, in create_environment
install_node(env_dir, src_dir, opt)
File "/home/bob/Documents/Projects/xyz/ENV/local/lib/python2.7/site-packages/nodeenv.py", line 608, in install_node
build_node_from_src(env_dir, src_dir, node_src_dir, opt)
File "/home/bob/Documents/Projects/xyz/ENV/local/lib/python2.7/site-packages/nodeenv.py", line 577, in build_node_from_src
callit([make_cmd] + make_opts, opt.verbose, True, node_src_dir, env)
File "/home/bob/Documents/Projects/xyz/ENV/local/lib/python2.7/site-packages/nodeenv.py", line 461, in callit
% (cmd_desc, proc.returncode))
OSError: Command make --jobs=2 failed with error code 2
关于可能出错的任何想法?
解决方法:
github.com/ekalinin/nodeenv/issues/136建议 ekalinin
使用nodeenv -p --prebuilt
命令在python虚拟环境中安装节点。出于某种原因,它不会产生错误。