Can't install the language-ocaml-fix package

When I try to install the package I get this error :

node-gyp rebuild


C:\Users\Clement\AppData\Local\Temp\apm-install-dir-2021124-9736-127uld7.fjtb\node_modules\language-ocaml-fix\node_modules\tree-sitter-dune>if not defined npm_config_node_gyp (node "C:\Users\Clement\AppData\Local\atom\app-1.54.0\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Clement\AppData\Local\atom\app-1.54.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 

gyp ERR! find Python 
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python 
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python 
gyp ERR! configure error 
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (C:\Users\Clement\AppData\Local\atom\app-1.54.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack     at PythonFinder.runChecks (C:\Users\Clement\AppData\Local\atom\app-1.54.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Clement\AppData\Local\atom\app-1.54.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack     at PythonFinder.execFileCallback (C:\Users\Clement\AppData\Local\atom\app-1.54.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack     at exithandler (child_process.js:297:5)
gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:309:5)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:9)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Users\\Clement\\AppData\\Local\\atom\\app-1.54.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Clement\\AppData\\Local\\atom\\app-1.54.0\\resources\\app\\apm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Clement\AppData\Local\Temp\apm-install-dir-2021124-9736-127uld7.fjtb\node_modules\language-ocaml-fix\node_modules\tree-sitter-dune
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Clement\AppData\Local\Temp\apm-install-dir-2021124-9736-127uld7.fjtb\package.json'
npm WARN apm-install-dir-2021124-9736-127uld7.fjtb No description
npm WARN apm-install-dir-2021124-9736-127uld7.fjtb No repository field.
npm WARN apm-install-dir-2021124-9736-127uld7.fjtb No README data
npm WARN apm-install-dir-2021124-9736-127uld7.fjtb No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tree-sitter-dune@0.15.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tree-sitter-dune@0.15.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Clement\.atom\.apm\_logs\2021-02-24T12_13_07_144Z-debug.log

Am I supposed to install some more things?

I’m having the same issue. Have you fixed this problem?

Nop, I gave up. But for another thing I learned what is th “PATH” it’s a windows thing you can change in your “environemnts variable”. If you have python installed in another directory than C:\Python27\python.exe, try to add the path to python .exe in your system path (you’ll find how to add things to your path if you google it)

I figured… I also gave up a while ago, now I’m just using the terminal to code and it’s not too shabby. I tried installing language-ocaml with opam but the repository isn’t available for some reason and I haven’t found a way to go around that, maybe it’s related to this problem with language-ocaml-fix.
Also I did have a problem once where I needed to include a new path to “PATH” in order to code with python, it was pretty useful finding that out. Either way thanks for your response!

1 Like