0

I have been trying to install pandas-datareader but I am facing a syntax error.

I am using Anaconda Spyder 3.1.2

Code:

pip install pandas-datareader

Error:

 File "<ipython-input-25-4ea57f630f45>", line 1
    pip install pandas-datareader
              ^
SyntaxError: invalid syntax

I also tried conda install pandas-datareader but same issue..

==============================

Today (13-07-2017) As per your solution i tried to do it in CMD but got these errors in screenshot(PFA)

installation error

Kindly help..

Naresh
  • 31
  • 1
  • 1
  • 3
  • Running pip or conda commands inside a Python or IPython console in Spyder doesn't work. Please open a system terminal (bash or cmd.exe) and run them there instead. – Carlos Cordoba Jul 12 '17 at 13:39
  • As per your suggestion i try to do in CMD but facing error.. Screenshot of error is attached in my question... Please help.. – Naresh Jul 14 '17 at 05:19
  • It seems you have a certificate problem that prevents you from installing things with pip. What happens if you try to run `conda install pandas-datareader`? – Carlos Cordoba Jul 14 '17 at 14:35
  • 1
    Thanks very much.. it seems to be worked... – Naresh Jul 17 '17 at 09:50
  • For next time, please try to use conda before pip. It's usually not a good idea to mix both of them in the same environment. – Carlos Cordoba Jul 17 '17 at 14:08

4 Answers4

1

Try entering the same code (pip install pandas-datareader) In the terminal instead of python shell.

Max Coates
  • 68
  • 5
  • 1
    As per your suggestion i try to do in CMD but facing error.. Screenshot of error is attached in my question... Please help me.. – Naresh Jul 14 '17 at 05:20
0

This should work (if you have pip installed, if not, have a look here or here):

pip install pandas-datareader

or you can use conda it should work as well:

conda install pandas-datareader

Don't forgot that you should use this command line in a terminal

Dadep
  • 2,702
  • 5
  • 23
  • 37
  • As per your suggestion i try to do in CMD but facing error.. Screenshot of error is attached in my question... Please help me.. – Naresh Jul 14 '17 at 05:20
0

use !pip install pandas-datareader

Chen A.
  • 7,798
  • 2
  • 26
  • 48
0

Had the same issue

I use Anaconda...I opened a juptyer notbook session and ran a code pip install pandas-datareader

it worked . I closed it and ran the datareader in sypder and it was fine