• Register
0 votes
1.4k views

I installed pyhton in my stystem.
But my system can not find pyton executable after installing python it shows me some error like :
 

error: can't find python executable 

also my node-gyp is failing:

$ $(npm config get python)
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ npm --version
4.5.0
$ node --version
v7.9.0

but it shows the output:

+ node_modules/.bin/electron-rebuild --arch x64 -f -p -w serialport -m electron-app
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.0
gyp info using node@7.9.0 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\mike\Work\dronefuse-client\node_modules\node-gyp\lib\configure.js:482:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\mike\Work\dronefuse-client\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\mike\Work\dronefuse-client\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\mike\\Work\\dronefuse-client\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=1.4.13" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=serialport" "--module_path=C:\\Users\\mike\\Work\\dronefuse-client\\electron-app\\node_modules\\serialport\\build\\Release" "--host=https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.7"
gyp ERR! cwd C:\Users\mike\Work\dronefuse-client\electron-app\node_modules\serialport
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok

can anyone help me out to get rid of this error.

10 7 2
6,050 points

1 Answer

0 votes

Your npm is not working because of it is not checking the value of pyhon cause of a invocation:

PATH="$(dirname $(npm config get python)):$PATH" node_modules/.bin/electron-rebuild --arch x64 -f -p -w serialport -m electron-app

Or run your CLI as administration
If it doesn’t work go to your command prompt and command:
 

npm install --global --production --windows-build-tools

 

11 6 4
34,930 points

Related questions

1 vote
1 answer 44 views
44 views
Problem : Currently I am learning anaconda and virtualenv. I want to start my virtual env using the virtualenv but I am facing below error: Already using interpreter /Users/pkilcrease/anaconda/bin/python3 Using base prefix '/Users/pkilcrease/anaconda' New python ... and virtualenv, but unable to fix the above error. Looking for experts advice for fixing above anaconda and virtualenv error.
asked May 6 stewart 4k points
0 votes
1 answer 15 views
15 views
I am setting up a django project and i am using python for this. I heard that the best way to this is by setting up a virtual environment. I installed my virtual environment by typing the command in my command promp by using: pip install virtualenvwrappwer-win But when I ... environment I can not start my project. I am new In django if anyone know the solution please help me to set up my project.
asked Mar 9 LizzyM 6.1k points
1 vote
2 answers 413 views
413 views
Problem : I am very new to the Node.js and I am having few issues. I am using the Node.js 4.10 and Express 2.4.3. While trying to execute my code I am receiving below error : Error: Can't render headers after they are sent to the client. ... , scope: 'offline_access,email,user_about_me,user_activities,manage_pages,publish_stream', failedUri: '/noauth' }) ])); realapp.use(realapp.router); }); . . .
asked Dec 12, 2019 alecxe 7.5k points
0 votes
1 answer 4 views
4 views
Why can't I perform arithmetic operations on a set. For example: {a+b} * c returns an error. When we try to do [a+b]*c, it returns a list. For instance: [4+5]*6 returns [9, 9, 9, 9, 9, 9]. But the same is not the result for the set. Why?
asked Sep 15 Marivoke 530 points