Spyder: could you tell me why it doesn t work (in console) on Spyder plz. Why Syntax Error?

Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
Type “copyright”, “credits” or “license” for more information.

IPython 7.6.1 – An enhanced Interactive Python.

runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)
Traceback (most recent call last):

File “C:\Users\nyckm\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py”, line 3325, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File “”, line 1, in
runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
execfile(filename, namespace)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)

File “C:/Users/nyckm/untitled0.py”, line 7
!pip install pandas_datareader==0.7.0
^
SyntaxError: invalid syntax

runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)
Traceback (most recent call last):

File “C:\Users\nyckm\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py”, line 3325, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File “”, line 1, in
runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
execfile(filename, namespace)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)

File “C:/Users/nyckm/untitled0.py”, line 7
!pip install pandas_datareader==0.7.0
^
SyntaxError: invalid syntax

runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)
Traceback (most recent call last):

File “C:\Users\nyckm\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py”, line 3325, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File “”, line 1, in
runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
execfile(filename, namespace)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)

File “C:/Users/nyckm/untitled0.py”, line 7
!pip install pandas_datareader==0.7.0
^
SyntaxError: invalid syntax

runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)
Traceback (most recent call last):

File “C:\Users\nyckm\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py”, line 3325, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File “”, line 1, in
runfile(‘C:/Users/nyckm/untitled0.py’, wdir=‘C:/Users/nyckm’)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
execfile(filename, namespace)

File “C:\Users\nyckm\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)

File “C:/Users/nyckm/untitled0.py”, line 7
!pip install pandas_datareader==0.7.0
^
SyntaxError: invalid syntax

Remove the below line and try again.



!pip install pandas_datareader==0.7.0



If the issue persists then share the screenshot from your spyder environment on quantra@quantinsti.com to check further.



Ishan