Magenta Python Package installation Failed!

184 views
Skip to first unread message

Mohammad Ramezani

unread,
Feb 25, 2022, 10:13:38 AMFeb 25
to Magenta Discuss
Hi there,

I am going to use the Magenta python package on my local machine using PyCharm. I tried to install this package a couple of times but it failed. I used the automatic and manual installation options (using pip) but it did not work. 
I also tried to install all the Magenta requirements manually and then go to install the Magenta, but it again failed.
I use the following configurations:
  • Windows 10 (64 bit), 
  • PyCharm 2021.3.2 (Professional Edition), 
  • Visual Studio 2022, 
  • Python 10.3
The error is:

error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3
 /GL /DNDEBUG /MD -Id:\\business\\idea_music\\project_7\\venv\\lib\\site-packages\\numpy\\core\\include -Id:\business\idea_music\project_7\venv\include
-IC:\Users\User\AppData\Local\Programs\Python\Python310\include -IC:\Users\User\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)
\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Progr
am Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Win
dows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcnumba/_dispatcher.c /Fobuild\temp.win-
amd64-3.10\Release\numba/_dispatcher.obj" failed with exit status 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numba
  Running setup.py clean for numba
  Building wheel for python-rtmidi (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\midiconstants.py -> build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\midiutil.py -> build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\release.py -> build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\__init__.py -> build\lib.win-amd64-3.10\rtmidi
      running build_ext
      building 'rtmidi._rtmidi' extension
      creating build\temp.win-amd64-3.10
      creating build\temp.win-amd64-3.10\Release
      creating build\temp.win-amd64-3.10\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG
/MD -D__WINDOWS_MM__ -Isrc -Id:\business\idea_music\project_7\venv\include -IC:\Users\User\AppData\Local\Programs\Python\Python310\include -IC:\Users\Us
er\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Progra
m Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\W
indows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc\RtMidi.cpp /Fobuild\temp.win-amd64-3.10\Release\src\RtMidi.obj /EHsc
      RtMidi.cpp
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG
/MD -D__WINDOWS_MM__ -Isrc -Id:\business\idea_music\project_7\venv\include -IC:\Users\User\AppData\Local\Programs\Python\Python310\include -IC:\Users\Us
er\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Progra
m Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\W
indows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc\_rtmidi.cpp /Fobuild\temp.win-amd64-3.10\Release\src\_rtmidi.obj /EHsc
      _rtmidi.cpp
      src\_rtmidi.cpp(7736): error C2105: '++' needs l-value
      src\_rtmidi.cpp(7738): error C2105: '--' needs l-value
      src\_rtmidi.cpp(7860): error C2105: '++' needs l-value
      src\_rtmidi.cpp(7862): error C2105: '--' needs l-value
      src\_rtmidi.cpp(8271): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\User\AppData\Local\Programs\Python\Python310\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src\_rtmidi.cpp(8284): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\User\AppData\Local\Programs\Python\Python310\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src\_rtmidi.cpp(8297): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\User\AppData\Local\Programs\Python\Python310\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src\_rtmidi.cpp(8599): warning C4996: 'PyEval_InitThreads': deprecated in 3.9
      src\_rtmidi.cpp(9878): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      src\_rtmidi.cpp(9894): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' faile
d with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-rtmidi
  Running setup.py clean for python-rtmidi
  Building wheel for llvmlite (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      running bdist_wheel
      d:\business\idea_music\project_7\venv\scripts\python.exe C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-0ya0vacs\llvmlite_3d3444b43
5704a1ebf4c2969e7a723cd\ffi\build.py
      Trying generator 'Visual Studio 14 2015 Win64'
      Traceback (most recent call last):
        File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-0ya0vacs\llvmlite_3d3444b435704a1ebf4c2969e7a723cd\ffi\build.py", line 192,
in <module>
          main()
        File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-0ya0vacs\llvmlite_3d3444b435704a1ebf4c2969e7a723cd\ffi\build.py", line 180,
in main
          main_win32()
        File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-0ya0vacs\llvmlite_3d3444b435704a1ebf4c2969e7a723cd\ffi\build.py", line 89, i
n main_win32
          generator = find_win32_generator()
        File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-0ya0vacs\llvmlite_3d3444b435704a1ebf4c2969e7a723cd\ffi\build.py", line 77, i
n find_win32_generator
          try_cmake(cmake_dir, build_dir, generator)
        File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-0ya0vacs\llvmlite_3d3444b435704a1ebf4c2969e7a723cd\ffi\build.py", line 28, i
n try_cmake
          subprocess.check_call(['cmake', '-G', generator, cmake_dir])
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 364, in check_call
          retcode = call(*popenargs, **kwargs)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 345, in call
          with Popen(*popenargs, **kwargs) as p:
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 966, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      error: command 'd:\\business\\idea_music\\project_7\\venv\\scripts\\python.exe' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build numba python-rtmidi llvmlite
Installing collected packages: python-rtmidi, pypng, pygtrie, pydub, pyasn1, pure-eval, pickleshare, mypy-extensions, mpmath, mido, llvmlite, libclang,
keras, gym-notices, gin-config, flatbuffers, executing, dm-tree, certifi, bz2file, backcall, audioread, zope.interface, zope.event, wrapt, werkzeug, url
lib3, uritemplate, typing-extensions, typeguard, traitlets, tornado, tomli, tifffile, threadpoolctl, tensorflow-io-gcs-filesystem, tensorboard-data-serv
er, sympy, sox, six, scipy, rsa, PyYAML, PyWavelets, pyparsing, pygments, pycparser, pyasn1-modules, protobuf, prompt-toolkit, platformdirs, Pillow, pat
hspec, parso, opt-einsum, opencv-python, oauthlib, numba, networkx, MarkupSafe, markdown, kiwisolver, joblib, itsdangerous, intervaltree, idna, h5py, gu
nicorn, greenlet, gast, future, fonttools, dill, decorator, cycler, colorama, cloudpickle, charset-normalizer, cachetools, attrs, tqdm, tensorflow-proba
bility, tensorflow-hub, tensorflow-addons, sk-video, scikit-learn, resampy, requests, python-dateutil, promise, pretty-midi, packaging, mir-eval, matplo
tlib-inline, keras-preprocessing, Jinja2, jedi, imageio, httplib2, gym, grpcio, googleapis-common-protos, google-pasta, google-auth, click, cffi, astunp
arse, asttokens, absl-py, tf-slim, tensorflow-metadata, tensorflow-gan, stack-data, soundfile, scikit-image, requests-oauthlib, pandas, oauth2client, me
sh-tensorflow, matplotlib, kfac, google-auth-httplib2, google-api-core, gevent, flask, dopamine-rl, dm-sonnet, bokeh, black, tensorflow-datasets, libros
a, IPython, google-auth-oauthlib, google-api-python-client, tensorboard, tensor2tensor, note-seq, tensorflow, magenta
  Attempting uninstall: python-rtmidi
    Found existing installation: python-rtmidi 1.4.9
    Uninstalling python-rtmidi-1.4.9:
      Successfully uninstalled python-rtmidi-1.4.9
  Running setup.py install for python-rtmidi ... error
  error: subprocess-exited-with-error

  × Running setup.py install for python-rtmidi did not run successfully.
  │ exit code: 1
  ╰─> [35 lines of output]
      running install
      d:\business\idea_music\project_7\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprec
ated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\midiconstants.py -> build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\midiutil.py -> build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\release.py -> build\lib.win-amd64-3.10\rtmidi
      copying rtmidi\__init__.py -> build\lib.win-amd64-3.10\rtmidi
      running build_ext
      building 'rtmidi._rtmidi' extension
      creating build\temp.win-amd64-3.10
      creating build\temp.win-amd64-3.10\Release
      creating build\temp.win-amd64-3.10\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG
/MD -D__WINDOWS_MM__ -Isrc -Id:\business\idea_music\project_7\venv\include -IC:\Users\User\AppData\Local\Programs\Python\Python310\include -IC:\Users\Us
er\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Progra
m Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\W
indows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc\RtMidi.cpp /Fobuild\temp.win-amd64-3.10\Release\src\RtMidi.obj /EHsc
      RtMidi.cpp
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG
/MD -D__WINDOWS_MM__ -Isrc -Id:\business\idea_music\project_7\venv\include -IC:\Users\User\AppData\Local\Programs\Python\Python310\include -IC:\Users\Us
er\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Progra
m Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\W
indows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc\_rtmidi.cpp /Fobuild\temp.win-amd64-3.10\Release\src\_rtmidi.obj /EHsc
      _rtmidi.cpp
      src\_rtmidi.cpp(7736): error C2105: '++' needs l-value
      src\_rtmidi.cpp(7738): error C2105: '--' needs l-value
      src\_rtmidi.cpp(7860): error C2105: '++' needs l-value
      src\_rtmidi.cpp(7862): error C2105: '--' needs l-value
      src\_rtmidi.cpp(8271): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\User\AppData\Local\Programs\Python\Python310\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src\_rtmidi.cpp(8284): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\User\AppData\Local\Programs\Python\Python310\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src\_rtmidi.cpp(8297): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\User\AppData\Local\Programs\Python\Python310\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src\_rtmidi.cpp(8599): warning C4996: 'PyEval_InitThreads': deprecated in 3.9
      src\_rtmidi.cpp(9878): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      src\_rtmidi.cpp(9894): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' faile
d with exit code 2
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
  WARNING: No metadata found in d:\business\idea_music\project_7\venv\lib\site-packages
  Rolling back uninstall of python-rtmidi
  Moving to d:\business\idea_music\project_7\venv\lib\site-packages\python_rtmidi-1.4.9.dist-info\
   from D:\Business\Idea_Music\Project_7\venv\Lib\site-packages\~ython_rtmidi-1.4.9.dist-info
  Moving to d:\business\idea_music\project_7\venv\lib\site-packages\rtmidi\
   from D:\Business\Idea_Music\Project_7\venv\Lib\site-packages\~tmidi
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> python-rtmidi

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Any help will be appreciated!
MeMo
 
Reply all
Reply to author
Forward
0 new messages