• Register
0 votes
2.1k 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,060 points

Please log in or register to answer this question.

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,950 points

Related questions

0 votes
1 answer 8 views
8 views
Problem: I'm trying to run the following command: npm install -g bower gulp cordova ionic tsd@next karma-cli protractor node-gyp coffee-script js-beautify typescript npm-check I have installed Python, Visual Studio Express and node-gyp so thought I'd be good to go, however I get the errors:
asked Jan 8 Mashhoodch 5.6k points
1 vote
1 answer 181 views
181 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, 2020 stewart 4k points
0 votes
1 answer 32 views
32 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, 2020 LizzyM 6.1k points
1 vote
2 answers 673 views
673 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
1 vote
1 answer 513 views
513 views
Problem: I am very new to node so I think I am making something extremely wrong here as I am unable to find any info at all by doing research online. I already have the django site and I required the JS charting library so I chose the chart.js. I have ... build a chart. Failed to create chart: can't acquire context from the given item . Please help me in fixing above NodeJs elated error.
asked Jun 4, 2020 Martin K 6.6k points
0 votes
1 answer 258 views
258 views
Problem : I am currently trying to use sudo npm install to install all of my dependencies for the application written in the nodejs. My OS is Ubuntu 13.04 But, I keep getting below warning: The authenticity of host 'github.com (192.30.252.131)' can't be established. RSA ... , I am unable to enter anything, not even a "yes". My terminal just got stuck,I have to press the ctrl+c to terminate.
asked Jan 24, 2020 jwilliam 3.9k points
0 votes
2 answers 511 views
511 views
Problem : I want to to run my NodeJS version with the nvm but getting following error: $ nvm use v4.2.4 nvm is not compatible with the npm config "prefix" option: currently set to "/Users/z/.npm-global"Run `npm config delete prefix` or `nvm use --delete- ... it. I have set the prefix on purpose to avoid the sudo npm How can I use nvm without losing the prefix for my globally installed packages?
asked Nov 29, 2019 alecxe 7.5k points
0 votes
1 answer 13 views
13 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, 2020 Marivoke 530 points
0 votes
1 answer 12 views
12 views
It seems to me like the files run the same without that line.
asked Oct 25, 2020 psandprop 2.4k points