• Register
0 votes
3k 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 20 views
20 views
Problem: How to fix this situation ? error: can't find python executable "python", you can set the python env variable..
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 34 views
34 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 13k points
0 votes
1 answer 23 views
23 views
Problem: gyp err! stack error: can't find python executable "python", you can set the python env variable.
asked Feb 23 Muneeb Saadii 130k points
0 votes
1 answer 4 views
4 views
Problem: I am facing this error can any one anser this? error 1083 the executable program that this service
asked Mar 19 PkGuy 13.1k points
1 vote
1 answer 385 views
385 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 63 views
63 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
0 votes
1 answer 7 views
7 views
Problem: I get the following error message when trying to set up a virtual environment with virtualenv 15.0.2 but receive: OSError setuptools pip wheel failed with error code 1. Any ideas how to resolve this issue?
asked Mar 24 ummesalma 25.2k points
0 votes
1 answer 20 views
20 views
Problem: configure: error: no acceptable c compiler found in $path.
asked Feb 22 Dan phillip 4.8k points
1 vote
1 answer 8 views
8 views
Problem : When I run pip install -r requirements.txt , I get this Error : ImportError: No module named pkg_resources Actually I'm deploying a Django app to a dev server and pkg_resources appears to be distributed with setuptools Any ideas as to why pkg_resources is not on the path?
asked Mar 12 Shovo210 13.8k points
1 vote
2 answers 916 views
916 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