pianoplayer icon indicating copy to clipboard operation
pianoplayer copied to clipboard

Windows 10 Installation instructions

Open AnsonLai opened this issue 4 years ago • 11 comments

I'm trying to get this set up on a Windows 10 machine and since I don't know what I'm doing I'm having a bit of trouble. I set up a virtualenv and pip installed pianoplayer. I was hoping to just run pianoplayer 123.xml to get some results.

When I run pianoplayer, I get: 'pianoplayer' is not recognized as an internal or external command, operable program or batch file.

I tried to run the script directly from what I could find, but I get: can't find '__main__' module as an error.

Just wondering if I absolutely need Anaconda, I'm running on plain python for now. Thanks!

AnsonLai avatar Dec 15 '19 18:12 AnsonLai

Hi @PharaohsVizier anaconda is not needed in principle, unfortunately I have very little experience with windows.. what if you run something like: python C:\Users\__USERNAME__\AppData\Local\Programs\Python\Python36\Lib\site-packages\pianoplayer\bin\pianoplayer Or edit the pianoplayer.bat to add the correct path where you pip installed the package?

marcomusy avatar Dec 15 '19 20:12 marcomusy

I think that might be one of the challenges. After pip installation, the pianoplayer folder in site-packages doesn't have a bin folder with the pianoplayer file. After a search, I'm quite convinced it's nowhere. I took it from the source code, placed it into the folder and tried to run it, but I get the same can't find '__main__' module error. I tried the pianoplayer.bat file as well and I get a flash. I'm almost certain I'm pointing it into the wrong path though. For the CALL, I've pointed it to the virtualenv activate, and for the python, I've pointed it towards the pianoplayer file in the bin folder.

AnsonLai avatar Dec 15 '19 20:12 AnsonLai

I'm unclear as to why, but once I cd into that directory and python pianoplayer it works fine. So for anyone who wants to do this on windows, make sure to download the \bin\ folder from github, place it into the directory and then cd into the \bin\ folder and run the pianoplayer file.

Thanks for making this!

AnsonLai avatar Dec 15 '19 21:12 AnsonLai

Thanks @PharaohsVizier for your input! Actually after trying installing it on a windows partition I found that the pianoplayer script gets stored in a different path: C:\Users\musy\AppData\Local\Programs\Python\Python37\Scripts\

so this starts the GUI normally on my system: python C:\Users\musy\AppData\Local\Programs\Python\Python37\Scripts\pianoplayer

Note that you need to have musescore executable in your path, otherwise you can just open the output.xml from the running musescore program (or using any other viewer).

I´ll leave this open and pinned in case it turns useful to other users.

marcomusy avatar Dec 15 '19 22:12 marcomusy

"generate" exports the invalid file that musescore does not read. "musescore" doesn't work because it only sends a musescore command prompt which is not suitable for windows.

There is no information that you can't use a newer version of python from 3.6, and you cant, because vtk will prevent installation of the package.

execution file would be a step forward, because it's a terrible nuisance.

bukakow avatar Mar 01 '20 09:03 bukakow

This is due to my poor familiarity with windows.. I'll try to fix these issues as soon as I can.

marcomusy avatar Mar 01 '20 10:03 marcomusy

Thanks @PharaohsVizier for your input! Actually after trying installing it on a windows partition I found that the pianoplayer script gets stored in a different path: C:\Users\musy\AppData\Local\Programs\Python\Python37\Scripts\

so this starts the GUI normally on my system: python C:\Users\musy\AppData\Local\Programs\Python\Python37\Scripts\pianoplayer

Note that you need to have musescore executable in your path, otherwise you can just open the output.xml from the running musescore program (or using any other viewer).

I´ll leave this open and pinned in case it turns useful to other users.

Hi, I am also using windows and new to python. I was able to get pianoplayer to launch from the bin folder I dragged over to site-packages/pianoplayer folder. I am also able to generate the output.xml which is output in the bin folder from before. When I try Musescore I get an error and I guess it is because I do not have the musescore executable in my path which I don't know exactly how to do.

The output looks just fine when I manually open it with musescore. My main thing is wanting to see it on the 3D player. When I press the 3D Player button I get this error:

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\username\AppData\Local\Programs\Python\Python36\lib\tkinter_init_.py", line 1699, in call return self.func(*args) File "pianoplayer", line 97, in vpCMD from pianoplayer.vkeyboard import VirtualKeyboard ModuleNotFoundError: No module named 'pianoplayer.vkeyboard'

Any help would be appreciated, mainly for the 3D player.

CtrlP1 avatar Sep 08 '20 18:09 CtrlP1

Hi @CtrlP1 are you sure you have the latest version of the module? Try pip install -U pianoplayer

Check out https://github.com/marcomusy/pianoplayer/issues/27 for more info about setting paths.

The 3D player at the moment has a few things I need to improve (especially the sound..), I hope i'll have more free time by the end of this month to fix them.

marcomusy avatar Sep 08 '20 19:09 marcomusy

Hi @CtrlP1 are you sure you have the latest version of the module? Try pip install -U pianoplayer

Check out #27 for more info about setting paths.

The 3D player at the moment has a few things I need to improve (especially the sound..), I hope i'll have more free time by the end of this month to fix them.

I checked and do have the latest version and I also added "C:\Program Files\MuseScore 3\bin" but I still get this error: try opening musescore 'musescore' is not recognized as an internal or external command, operable program or batch file.

CtrlP1 avatar Sep 09 '20 00:09 CtrlP1

I'm unclear as to why, but once I cd into that directory and python pianoplayer it works fine. So for anyone who wants to do this on windows, make sure to download the \bin\ folder from github, place it into the directory and then cd into the \bin\ folder and run the pianoplayer file.

Thanks for making this!

Howdy AnsonLai, do you still use this program? was hoping you could chime in on this issue since you're also using windows. Any help would be greatly appreciated, thanks.

CtrlP1 avatar Sep 09 '20 00:09 CtrlP1

Unfortunately I never took that extra step of using Musescore, I was purely interested in the output.xml for a few specific files. Sorry!

AnsonLai avatar Sep 09 '20 02:09 AnsonLai