Failed building wheel for python-rtmidi - python

I'm trying to import magenta to use wavenet, however it always fails and I cannot find any useful information online.
It keeps give me this error information
Building wheels for collected packages: numba, python-rtmidi, llvmlite
Building wheel for numba (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\13003\AppData\Local\Temp\pip-install-417gts98\numba_d67d4f03411546d299e8418ef12a08c5\setup.py", line 358, in <module>
metadata['ext_modules'] = get_ext_modules()
File "C:\Users\13003\AppData\Local\Temp\pip-install-417gts98\numba_d67d4f03411546d299e8418ef12a08c5\setup.py", line 94, in get_ext_modules
import numpy.distutils.misc_util as np_misc
File "D:\Anaconda\envs\venv\lib\site-packages\numpy\distutils\__init__.py", line 24, in <module>
from . import ccompiler
File "D:\Anaconda\envs\venv\lib\site-packages\numpy\distutils\ccompiler.py", line 20, in <module>
from numpy.distutils import log
File "D:\Anaconda\envs\venv\lib\site-packages\numpy\distutils\log.py", line 4, in <module>
from distutils.log import Log as old_Log
ImportError: cannot import name 'Log' from 'distutils.log' (D:\Anaconda\envs\venv\lib\site-packages\setuptools\_distutils\log.py)
[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
error: subprocess-exited-with-error
c:\users\13003\appdata\local\temp\pip-install-417gts98\python-rtmidi_e5f4214911f54de8b049d39f4499d15a\src\RtMidi.h(48): fatal error C1083: Cannot open include file: 'exception': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed 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
Message: '"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__ -Isrc -ID:\\Anaconda\\envs\\venv\\include -ID:\\Anaconda\\envs\\venv\\Include /EHsc /Tpsrc\\RtMidi.cpp /Fobuild\\temp.win-amd64-cpython-39\\Release\\src\\RtMidi.obj /EHsc'
Arguments: ()
RtMidi.cpp
c:\users\13003\appdata\local\temp\pip-install-417gts98\python-rtmidi_e5f4214911f54de8b049d39f4499d15a\src\RtMidi.h(48): fatal error C1083: Cannot open include file: 'exception': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of python-rtmidi
Moving to d:\anaconda\envs\venv\lib\site-packages\python_rtmidi-1.4.9.dist-info\
from D:\Anaconda\envs\venv\Lib\site-packages\~ython_rtmidi-1.4.9.dist-info
Moving to d:\anaconda\envs\venv\lib\site-packages\rtmidi\
from D:\Anaconda\envs\venv\Lib\site-packages\~tmidi
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
I'm sure I have installed python-rtmidi, numba,llvmlite but it keeps finding them in an unexit path.
Anyone can help me out?? I really appreciate it T_T

Try setting this environment variable first:
export SETUPTOOLS_USE_DISTUTILS=stdlib
or alternatively prefix your command, e.g. change poetry install to:
SETUPTOOLS_USE_DISTUTILS=stdlib poetry install
(source)

Related

Trying to install Yt-Dlp module but having problems with Brotli installation step

I'm trying to install the Yt-Dlp module for Python 3.11 but for some reason I get this error
Building wheels for collected packages: brotli
Building wheel for brotli (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating bin
creating bin\lib.win-amd64-cpython-311
copying python\brotli.py -> bin\lib.win-amd64-cpython-311
running build_ext
building '_brotli' extension
creating bin\temp.win-amd64-cpython-311
creating bin\temp.win-amd64-cpython-311\Release
creating bin\temp.win-amd64-cpython-311\Release\c
creating bin\temp.win-amd64-cpython-311\Release\c\common
creating bin\temp.win-amd64-cpython-311\Release\c\dec
creating bin\temp.win-amd64-cpython-311\Release\c\enc
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic/include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /Tcc/common/constants.c /Fobin\temp.win-amd64-cpython-311\Release\c/common/constants.obj
constants.c
C:\Users\igor\AppData\Local\Temp\pip-install-cplthpdp\brotli_bec0f5da12d0434ea2253cdadf0efb64\c\common\./platform.h(26): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'string.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed 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 brotli
Running setup.py clean for brotli
Failed to build brotli
Installing collected packages: brotli, websockets, yt-dlp
Running setup.py install for brotli ... error
error: subprocess-exited-with-error
× Running setup.py install for brotli did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
warnings.warn(
running install
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating bin
creating bin\lib.win-amd64-cpython-311
copying python\brotli.py -> bin\lib.win-amd64-cpython-311
running build_ext
building '_brotli' extension
creating bin\temp.win-amd64-cpython-311
creating bin\temp.win-amd64-cpython-311\Release
creating bin\temp.win-amd64-cpython-311\Release\c
creating bin\temp.win-amd64-cpython-311\Release\c\common
creating bin\temp.win-amd64-cpython-311\Release\c\dec
creating bin\temp.win-amd64-cpython-311\Release\c\enc
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic/include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /Tcc/common/constants.c /Fobin\temp.win-amd64-cpython-311\Release\c/common/constants.obj
constants.c
C:\Users\igor\AppData\Local\Temp\pip-install-cplthpdp\brotli_bec0f5da12d0434ea2253cdadf0efb64\c\common\./platform.h(26): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'string.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
I have already tried uninstalling and reinstalling the C++ Build Tools, resetting the PC, installing the Brotli package by itself but it still gives me this error, and not only I have no idea why, I cannot even comprehend error message. Can anyone help me?

error setup ta-lib Python.h requires that stdio.h define NULL

when i try to install ta-lib i have this problem, nonetheless i installed before talib($ brew install talib)
Thank you for help or a hint....
$ pip install ta-lib
Collecting ta-lib
Using cached TA-Lib-0.4.24.tar.gz (269 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from ta-lib) (1.21.5)
Building wheels for collected packages: ta-lib
Building wheel for ta-lib (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
running build
running build_py
running build_ext
skipping 'talib/_ta_lib.c' Cython extension (up-to-date)
building 'talib._ta_lib' extension
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/stdio.h:32:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/cdefs.h:758:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from talib/_ta_lib.c:6:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
# error "Python.h requires that stdio.h define NULL."
^
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:30:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/string.h:41:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/types.h:78:10: fatal error: 'machine/types.h' file not found
#include <machine/types.h>
^~~~~~~~~~~~~~~~~
3 errors generated.
error: command '/usr/local/Cellar/llvm#9/9.0.1_4/bin/clang' 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 ta-lib
Running setup.py clean for ta-lib
Failed to build ta-lib
Installing collected packages: ta-lib
Running setup.py install for ta-lib ... error
error: subprocess-exited-with-error
× Running setup.py install for ta-lib did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running install
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
skipping 'talib/_ta_lib.c' Cython extension (up-to-date)
building 'talib._ta_lib' extension
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/stdio.h:32:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/cdefs.h:758:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from talib/_ta_lib.c:6:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
# error "Python.h requires that stdio.h define NULL."
^
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:30:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/string.h:41:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/types.h:78:10: fatal error: 'machine/types.h' file not found
#include <machine/types.h>
^~~~~~~~~~~~~~~~~
3 errors generated.
error: command '/usr/local/Cellar/llvm#9/9.0.1_4/bin/clang' failed with exit code 1
[end of output]

how to fix error while installing chatterbot

i get this error when trying to install chatterbot
im using python 3.10
c1xx: fatal error C1083: Cannot open source file: 'preshed/maps.cpp': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]

Cannot install flask_mysqldb package on cpanel shared hosting server

I am trying to install flask_mysqldb on cpanel shared hosting server, but I keep getting the error:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient, flask-mysqldb
Running setup.py install for mysqlclient ... error
error: subprocess-exited-with-error
× Running setup.py install for mysqlclient did not run successfully.
│ exit code: 1
╰─> [312 lines of output]
mysql_config --version
MySQLdb/_mysql.c:46:20: error: Python.h: No such file or directory
MySQLdb/_mysql.c:52:25: error: bytesobject.h: No such file or directory
MySQLdb/_mysql.c:53:26: error: structmember.h: No such file or directory
cc1: warning: unrecognized command line option "-Wno-unused-result"
error: command '/usr/bin/gcc' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> mysqlclient
Infact, the error almost exactly same as in the question:
https://serverfault.com/questions/1095132/pip-install-mysqlclient-on-cloudlinux
From What I understand mysqlclient is not building on the server. Any way to solve this issue?

Problem while installing package in pycharm

i'm trying to install ivi package in pycharm, but received the following error:
running build_ext
building 'ivi.optimizations' extension
optimizations.c
C:\Users\tester\AppData\Local\Programs\Python\Python38\include\pyconfig.h(205): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
Error log screenshot
Full log
using windows 7, and python 3.8.10 is installed.

Categories

Resources