Google finance 在Python中使用googlefinance包

Google finance 在Python中使用googlefinance包,google-finance,Google Finance,我对Python非常陌生。我最近刚刚通过PIP安装了Google Finance Python包 但只要我试着跑 import googlefinance 我收到一条错误消息:- 没有名为googlefinance的模块 有人能帮我吗?我不确定到底出了什么问题对我来说很好: richy@cisco → pip install googlefinance Collecting googlefinance Downloading googlefinance-0.7.tar.gz Installi

我对Python非常陌生。我最近刚刚通过PIP安装了Google Finance Python包

但只要我试着跑

import googlefinance
我收到一条错误消息:-

没有名为googlefinance的模块

有人能帮我吗?我不确定到底出了什么问题

对我来说很好:

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
>>>
这个问题可能与python2和python3的混淆有关吗? 如果您想在python3中使用该模块(假设受支持),则必须使用pip3来安装它

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@cisco → 蟒蛇3
Python 3.4.3(默认值,2015年2月25日,21:28:45)
[GCC 4.2.1达尔文兼容苹果LLVM 6.0(clang-600.0.56)]
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口谷歌金融
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为“googlefinance”的模块

您可能需要执行sudopip安装googlefinance

当提示输入密码时。我也有类似的问题,使用sudo-pip对我来说很有用