How to use a different version of python during NPM install?

后端 未结 6 654
無奈伤痛
無奈伤痛 2020-12-07 06:39

I have terminal access to a VPS running centos 5.9 and default python 2.4.3 installed. I also installed python 2.7.3 via these commands: (I used make altinstall

6条回答
  •  不思量自难忘°
    2020-12-07 07:27

    This one works better if you don't have the python on path or want to specify the directory :

    //for Windows
    npm config set python C:\Python27\python.exe
    
    //for Linux
    npm config set python /usr/bin/python27
    

提交回复
热议问题