1、正常安裝應該是
pip install PyExecJS
2、安裝出現問題
我在安裝時出現如下問---安裝pyexecjs出現問題:(pip安裝第三方庫出現問題)
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping
3、解決方案
1.進入cmd 創建 pip文件夾 2.進入C:\Users\Administrator在該文件夾下創建pip.ini,寫入一下內容: [global] index-url=http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com 3.接下來配置環境變量 C:\Users\Administrator\%HOMEPATH%\pip\pip.ini 就可以愉快的使用pip了
4 、python 運行js代碼出現問題
報錯:execjs._exceptions.ProgramError: SyntaxError: 缺少標識符、字符串或數字
解決:
本地安裝node.js(注:配環境變量)
>>> import execjs
>>> execjs.get().name
'Node.js (V8)'
