MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Installing modules on windows



  • I’m trying to install modules on windows - but I get the following error. I’ve installed python - but no change.
    Any suggestions? 🙂

    
    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! fi
    
    


  • @vintage89 which git did u install? mine is a binary



  • @vintage89 also, after installing python, did you close and re-open the command prompt? the path is set only when the window opens



  • @sdetweil Tried installing this module https://github.com/Thlb/MMM-synology-ds



  • @vintage89 said in Installing modules on windows:

    https://github.com/Thlb/MMM-synology-ds

    ok, that installed, fine, but has an embedded component that is electron version sensitive

    so

    cd ~/MagicMirror
    npm install electron-rebuild
    cd modules/MMM-synology-ds
    ../../node_modules/.bin/electron-rebuild
    cd ~/MagicMirror
    npm start
    


  • @sdetweil
    Thanks 🙂
    I´ve run the script, but when I tried to start it gave me this:

    
    pi@raspberrypi:~/MagicMirror $ npm start
    
    > magicmirror@2.11.0 start /home/pi/MagicMirror
    > electron js/electron.js
    
    
    (electron:8589): Gtk-WARNING **: 14:59:29.032: cannot open display: 
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! magicmirror@2.11.0 start: `electron js/electron.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the magicmirror@2.11.0 start 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!     /home/pi/.npm/_logs/2020-04-11T12_59_29_059Z-debug.log
    
    

    I changed the package.json to this - like you said in my other post:

    4E9946A3-9DCE-41FA-9833-5CA4345521F6.jpeg



  • @vintage89 do

    export DISPLAY=:0

    then
    npm start

    these two steps are what the original code did, would have worked on linux… just not on Windows…
    windows doesn’t have ‘xwindows display’



  • @sdetweil
    Gave me this, did I do something wrong? 🙂

    
    pi@raspberrypi:~ $ export DISPLAY=:0
    pi@raspberrypi:~ $ cd MagicMirror/
    pi@raspberrypi:~/MagicMirror $ npm start
    
    > magicmirror@2.11.0 start /home/pi/MagicMirror
    > electron js/electron.js
    
    
    (electron:813): Gtk-WARNING **: 15:08:03.027: cannot open display: :0
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! magicmirror@2.11.0 start: `electron js/electron.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the magicmirror@2.11.0 start 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!     /home/pi/.npm/_logs/2020-04-11T13_08_03_102Z-debug.log
    
    


  • @sdetweil ahh, sorry - forgot to mention that I got my rassberry today, so I’m on a raspberry now. My bad!!



  • @vintage89 how are u connected to the pi? ssh, vnc, on the monitor?

    and you are using the graphical desktop version of Raspian, right?? u must to display on the pi…


Log in to reply