Ghadjeres / DeepBach

code accompanying "DeepBach: a Steerable Model for Bach Chorales Generation" paper
MIT License
500 stars 131 forks source link

Issue running musescore_flask_server.py #88

Open BRKNCD opened 2 years ago

BRKNCD commented 2 years ago

I know this installation is deprecated, but I really want to try the MuseScore plugin. When I run the musescore_flask_server.py command, I get the following error:

C:\Users\****\Desktop\DeepBach\DeepBach-master>musescore_flask_server.py
Traceback (most recent call last):
  File "C:\Users\****\Desktop\DeepBach\DeepBach-master\musescore_flask_server.py", line 4, in <module>
    import click
ModuleNotFoundError: No module named 'click'

C:\Users\Gian\Desktop\DeepBach\DeepBach-master>

I've already installed click by running the command: pip3.10 install click, that succesfully installed click:

Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Requirement already satisfied: colorama in c:\users\****\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from click) (0.4.5)
Installing collected packages: click
Successfully installed click-8.1.3

[notice] A new release of pip available: 22.2.1 -> 22.2.2
[notice] To update, run: C:\Users\****\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip

my python --versionis: Python 3.10.6

Ghadjeres commented 2 years ago

Does the musescore_flask_server.py server works after installing the missing click package?

You may still have problems when using the Musescore plugin deepBachMuseScore.qml as I used the file "/tmp/deepbach.mxl" to read and write DeepBach compositions. You can try changing this to a Window-style file in deepBachMuseScore.qml. Hope this helps

BRKNCD commented 2 years ago

No, it still gives me the error: ModuleNotFoundError: No module named 'click' I'm not sure I can comprehend your last suggestion, I'm afraid. I don't know how to proceed and I would really like to try out this script. Thank you for your help!

Ghadjeres commented 2 years ago

Can you check if you are in the correct virtual environment?

BRKNCD commented 2 years ago

Thank you so much for your help, I really appreciate it!

I tried to install the whole thing again, but unfortunately the installation process is too complicated for someone unfamiliar with either one of cmd, git, python, conda, torch, music21, and so on. Right now, I'm not able to recreate the issue with the click module I had, only because I'm stuck way before getting to that point.

This is my proceeding from the beginning:

open cmd as admin; cd C:\Users\****\Desktop\DeepBach\DeepBach-master to access the folder where I downloaded and extracted the zip archive

conda env create --name deepbach_pytorch -f environment.yml this one now immediately throws me the following error: Solving environment: failed

So at the moment I'm not even able to start the virtual environment and I can't figure out why.

Also I tried to download the dataset running the command: bash dl_dataset_and_models.sh but it returned me: "bash" is not a recognized command so I installed bash: pip3 install bash runned the command again: bash dl_dataset_and_models.sh but still it returned me: "bash" is not a recognized command

I'm sorry if I'm wasting anyone's time, but I'm really curious to see this one working! Thank you so much

Ghadjeres commented 2 years ago

Hi, So sorry, I must admit I know nothing about how to make this work on Windows. Maybe you already have the deepbach_pytorch virtual environment created, so that you cannot create it again. Maybe using WSL https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux could help make things easier.