Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systax error #19

Open
cheran2017 opened this issue Apr 27, 2019 · 3 comments
Open

Systax error #19

cheran2017 opened this issue Apr 27, 2019 · 3 comments

Comments

@cheran2017
Copy link

C:\Users\Cheran\Desktop\python\J.A.R.V.I.S>python script.py
File "script.py", line 52
print r.recognize_google(audio)
^
SyntaxError: invalid syntax

why am facing this error?

@rohan-arora-99
Copy link

print (r.recognize_google(audio))
this code supports python 2.x and not 3.x
so you have to make required changes

@avinkr
Copy link

avinkr commented Jun 22, 2021

File "script.py", line 102
print "J.A.R.V.I.S: " + jarvis_speech
syntax error and i am not able install the pip install pyaudio

i am getting this error
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lenovo\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lenovo\AppData\Local\Temp\pip-install-363fiovt\pyaudio_acd1240551984f49b91f1430d22a7b7d\setup.py'"'"'; file='"'"'C:\Users\lenovo\AppData\Local\Temp\pip-install-363fiovt\pyaudio_acd1240551984f49b91f1430d22a7b7d\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\lenovo\AppData\Local\Temp\pip-record-c23qkm0k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lenovo\appdata\local\programs\python\python39\Include\pyaudio'
cwd: C:\Users\lenovo\AppData\Local\Temp\pip-install-363fiovt\pyaudio_acd1240551984f49b91f1430d22a7b7d
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lenovo\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lenovo\AppData\Local\Temp\pip-install-363fiovt\pyaudio_acd1240551984f49b91f1430d22a7b7d\setup.py'"'"'; file='"'"'C:\Users\lenovo\AppData\Local\Temp\pip-install-363fiovt\pyaudio_acd1240551984f49b91f1430d22a7b7d\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\lenovo\AppData\Local\Temp\pip-record-c23qkm0k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lenovo\appdata\local\programs\python\python39\Include\pyaudio' Check the logs for full command output.

@2004satwik
Copy link

you should be having latest version of visual c++(v14 above) installed in your computer.
refer to this link below to solve this issue...
https://stackoverflow.com/questions/48541801/microsoft-visual-c-14-0-is-required-get-it-with-microsoft-visual-c-build-t
or
watch this video(link given below)
https://youtu.be/vc2x3q4k8BY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants