错误:Could not find an available JavaScript runtime
Posted 我和姚明一样高
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误:Could not find an available JavaScript runtime相关的知识,希望对你有一定的参考价值。
使用execjs 解析抓取的网页数据时,报错:Could not find an available javascript runtime
pip install pyPyExecjs 安装
解决方案:
下载:wget https://nodejs.org/dist/v8.11.4/node-v8.11.4.tar.gz
安装Node:./configure --prefix=/usr/local/node; make install
通过错误定位到文件site-packages/execjs/_runtimes.py,从中可以看到取JavaScript Runtime是这个“EXECJS_RUNTIME”环境变量读取
设置环境变量:export EXECJS_RUNTIME=/usr/local/node
以上是关于错误:Could not find an available JavaScript runtime的主要内容,如果未能解决你的问题,请参考以下文章
could not find an installed version of gradle either in android studio
docker could not find an available, non-overlapping IPv4 address pool among the defaults to assign t
fltk-rs踩坑记录,解决could not find native static library cfltk, perhaps an -L flag is missing 问题
ionic3打包出错ionic cordova build android(系列一):could not find an installed version of gradle either in a