2

I am very new to Python. I have just recently installed the Google Finance Python package via PIP.

But as soon as i try to run

import googlefinance

I get an error message :-

No module named googlefinance

.

Can someone please help me? I am not sure what's actually going wrong

EdChum
  • 376,765
  • 198
  • 813
  • 562
vicky113
  • 351
  • 1
  • 6
  • 19

2 Answers2

1

Works fine for me:

richy@cisco → pip install googlefinance
Collecting googlefinance
Downloading googlefinance-0.7.tar.gz
Installing collected packages: googlefinance
Running setup.py install for googlefinance
Successfully installed googlefinance-0.7

richy@cisco → python
Python 2.7.9 (default, Jan  7 2015, 11:49:12)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import googlefinance
>>>

Could the issue be related to mixing up python2 and python3? If you want to use the module (assuming it is supported) in python3 you have to use pip3 to install it.

richy@cisco → python3
Python 3.4.3 (default, Feb 25 2015, 21:28:45)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import googlefinance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'googlefinance'
Richy
  • 380
  • 2
  • 10
0

you might need to do sudo pip install googlefinance

when it prompts enter your password. I had similar issue and using sudo pip works for me!

Mai
  • 1