3

I have been attempting to install magenta on anaconda for a few days now, but every time I feel like I'm getting close to achieving an actual functional environment that can run it, I run into errors. Originally I thought the issue might be some conflicting versions, so I created a whole new environment and ran "pip install magenta" to hopefully come up with a working environment. That's when I got these two errors during the install:

ERROR: tensorflow 2.2.0 has requirement scipy==1.4.1; python_version >= "3", but you'll have scipy 1.5.1 which is incompatible.
ERROR: tensor2tensor 1.15.7 has requirement tensorflow-probability==0.7.0, but you'll have tensorflow-probability 0.10.1 which is incompatible.

I figured this might be a simple fix, since it was probably just different versions I needed to install, so I proceeded to install the specified versions that it says it requires in the error message. Then I got a completely different error that was structured the same but was slightly different.

ERROR: apache-beam 2.22.0 has requirement oauth2client<4,>=2.0.1, but you'll have oauth2client 4.1.3 which is incompatible.

After receiving this error I decided it would probably be best if I just started all over and tried this again, so I made another new environment and did it all again. Needless to say, my many attempts have given me nothing in return, let alone a functional environment.

I even took the time to reach out to a friend and asked for his help, and he followed similar steps to me and used the pip install to attempt to get magenta, but this just led to the same two errors on his machine. I also tried completely wiping python off the computer and it, wiping anaconda off the computer and reinstalling it, and I've tested this with different versions of python.

The strangest part to all this was when I originally installed magenta to my first environment, it actually got so far as to compile the code, until it said tensorflow was out of date, which was what got me on this wild chase to find all the correct versions of everything.

I also have tried just simply ignoring the problems after changing versions or even before and just trying to compile code in IntelliJ, but whenever I try to use the environment, it either won't compile anything at all, or has these two errors.

2020-07-17 00:38:44.182011: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-07-17 00:38:44.182121: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

I figured that maybe I am missing something entirely about this whole situation or hopefully it is something very simple that just seems like a bigger problem than it is.

Any help at all will be appreciated and if there are any logs needed I will provide them. I just want to get magenta working for a project that I was planning on attempting and it seems that just installing it will end up being the most time consuming part of the whole project.

Syzygyn
  • 58
  • 6
  • 1
    can you please run `pip freeze > req.txt` and share that file contents too? – oreopot Jan 03 '21 at 01:31
  • @oreopot https://hastebin.com/ofomedagas.apache here's my file contents after running that command – Jodast Jan 04 '21 at 04:38
  • Please list all commands you use, starting with creating the environment. We don't know which Python version you use (with still too new Python 3.9 you'll probably run into issues) or if you activate the environment at all. I had no problem with installing magenta on a new conda environment with Python 3.8 (Linux): `conda create -n myenv python=3.8`; `conda activate myenv`; `pip install magenta`. – Darkonaut Jan 04 '21 at 15:15
  • @Darkonaut I use Python 3.8.5, and just did all those things. got the errors `ERROR: Failed building wheel for python-rtmidi`, and another longer error related to rtmidi – Jodast Jan 04 '21 at 21:01
  • 1
    Which OS? I found [this](https://github.com/magenta/magenta/issues/781) and [this](https://github.com/SpotlightKid/python-rtmidi/issues/28) related to your recent error. Don't forget updating pip and conda before. I use [`conda-forge`](https://conda-forge.org/) as top-priority conda-channel, btw. You could add another hastebin for your output for `conda config --show`. – Darkonaut Jan 04 '21 at 21:34
  • 1
    @Jodast Only now realized you are not the OP. – Darkonaut Jan 04 '21 at 21:49
  • 1
    @Darkonaut I'm the one who put the bounty on this! I'm using windows 10, here's the hastebin for `conda config --show`: https://hastebin.com/eyajamarit.yaml e: the two github issues seem to be for linux? do you know if they work for windows as well? – Jodast Jan 04 '21 at 21:54
  • 1
    @Jodast Yeah I figured this out meanwhile ;) I'm not on Windows so somebody else will have to step in. In case you haven't found: [python-rtmidi installation docs](https://spotlightkid.github.io/python-rtmidi/installation.html). – Darkonaut Jan 04 '21 at 22:26
  • Have you guys followed the instructions available at [official Magenta repo](https://github.com/magenta/magenta#installation) ? – anurag Jan 06 '21 at 06:12
  • @anurag yes, to the extent that they are offered for windows. it's clearly made for apple and linux – Jodast Jan 06 '21 at 21:43
  • It seems @Darkonaut was able to figure it out on a non-Windows (Linux?) OS. I recommend using the Windows Systems for Linux (WSL) and trying to install Magenta in a Linux environment. Very easy setup (via Microsoft app store) and not a dual boot; WSL is a compatibility layer. Windows file system is completely accessible via Linux terminal (something like /mnt/C/users/...). Perhaps someone could give specific instructions for a Linux installation of Magenta. – Ghoti Jan 07 '21 at 18:45
  • Sometimes you need to uninstall and then reinstall packages to get them to work. – PythonicOreo Jan 08 '21 at 00:51
  • Please accept ma answer if it helped you. – TheEagle Jan 19 '21 at 12:08

2 Answers2

1

2020-07-17 00:38:44.182011: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2020-07-17 00:38:44.182121: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

If you have no GPU on your machine, ignore the error. If you do have one, install CUDA, which provides that missing library.

ERROR: apache-beam 2.22.0 has requirement oauth2client<4,>=2.0.1, but you'll have oauth2client 4.1.3 which is incompatible.

Just install all incompatible dependencies pip complains of manually with the right version, and you should get it installed.

TheEagle
  • 5,808
  • 3
  • 11
  • 39
0

I would recommend building a new environment with conda so that it will make sure the installed packaged will be compatible with each other.

conda install -n new_env tensorflow=[tf_version] python=[python_version] magenta=[magenta_version]
conda activate new_env

should work. If you have GPU on your machine, replace tensorflow with tensorflow-gpu.

aargun
  • 126
  • 4