Forums

Installing Yahoo-Finance

Hi... I'm totally new to Python. Now I want to write a tiny program just to display the stock market close. I googled around and saw that yahoo-finance was probably the thing to use.

This does not seem to be installed

I opened up a BASH console and typed pip install yahoo-finance and got loads of errors. Any help greatly appreciated:

Also - if I get it to install is it permanently there?

17:32 ~ $ pip install yahoo-finance Collecting yahoo-finance Downloading yahoo-finance-1.2.1.zip Requirement already satisfied (use --upgrade to upgrade): pytz in /usr/local/lib/python2.7/dist-packages (from yahoo-finance) Requirement already satisfied (use --upgrade to upgrade): simplejson in /usr/local/lib/python2.7/dist-packages (from yahoo-finance) Building wheels for collected packages: yahoo-finance Running setup.py bdist_wheel for yahoo-finance ... done Stored in directory: /home/thiw/.cache/pip/wheels/19/32/45/7da24fceb57286f1b49821d0e0021ffd78f9436bfc78676c38 Successfully built yahoo-finance Installing collected packages: yahoo-finance Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 732, in install **kwargs File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 835, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1030, in move_wheel_files isolated=self.isolated, File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 344, in move_wheel_files clobber(source, lib_dir, True) File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 315, in clobber ensure_dir(destdir) File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 83, in ensure_dir os.makedirs(path) File "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/yahoo_finance'

You need to add --user to do your own installs, see http://help.pythonanywhere.com/pages/InstallingNewModules

Also, which Python version do you want to use? Probably 2.7, 3.3 or 3.4 - it affects which 'pip' command you use, see the same help page.

HTH

Jim