python/errors and solved
-
TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S32')python/errors and solved 2017. 11. 26. 15:10
"TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S32')" If you create an array of numpy and then do an operation. >>> a = numpy.array(datingLabels)>>> aarray(['3', '2', '1', '1', '1', '1', '3', '3', '1', '3', '1', '1', '2', '1', '1', '1', '1', '1', '2', '3', '2', '1', '2', '3', '2', '3', '2', '3', '2', '1', '3', '1', '3', '1', '2', '1', '1', '2', '3', '3',..
-
[python] fatal error: Python.h: No such file or directorypython/errors and solved 2017. 11. 26. 14:52
"fatal error: Python.h: No such file or directory" I tried to install pyaudio in raspberry Pi. $ sudo pip install pyaudio but the following error occurred. Downloading/unpacking pyaudio Downloading PyAudio-0.2.9.tar.gz (289kB): 289kB downloaded Running setup.py (path:/tmp/pip-build-vnFPg1/pyaudio/setup.py) egg_info for package pyaudio warning: no files found matching '*.c' under directory 'test'..
-
[python] SyntaxError: Non-ASCII characterpython/errors and solved 2017. 11. 26. 14:41
"Troubleshooting Hangul(not in ascii) comment SyntaxError: Non-ASCII character" SyntaxError: Non-ASCII character '\xec' in file aaa.py on line 8, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details If you add Hangul(or Non Ascii) comment, the above error occurs.In this case, put the following statement at the top of the source code. # -*- coding: utf-8 -*- Referencehtt..
-
[python] ImportError: No module named requestspython/errors and solved 2017. 11. 26. 14:30
"ImportError: No module named requests" The 'request' module does not exist.Please the following command for installation. $ sudo pip install requests if pip module is not installed, please install pip module like below first. $ sudo apt install python-pip If you are trying to install requests module and you see the following message: Requirement already satisfied (use --upgrade to upgrade): req..