我在从GitHub导入Python API时遇到问题

时间:2016-04-07 00:26:28

标签: python python-3.x github

我试图在我的项目中使用这个Python API: https://github.com/Rami114/Stockfighter

我一直得到一个ImportError:没有名为Stockfighter.Api的模块

我的文本编辑器是SublimeText 3,我的代码如下所示:

from Stockfighter.Api import StockFighterApi

我也尝试使用sys:

导入它
import sys
sys.path.append('/Users/myname/Desktop/PythonGames/Stockfighter-master/Stockfighter')

from Stockfighter.Api import StockFighterApi

我使用以下代码从终端的github下载api:

$ python3 -m pip install git+https://github.com/Rami114/Stockfighter.git

这是从该安装产生的结果

  

收集git + https://github.com/Rami114/Stockfighter.git     将https://github.com/Rami114/Stockfighter.git克隆到/ var / folders / cg / 2k70brh54y51hm65qh4dhwch0000gn / T / pip-w9ptx96u-build     要求已经满足(使用--upgrade升级):Stockfighter == 0.1 from git + https://github.com/Rami114/Stockfighter.git in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/Stockfighter-0.1 -py3.5.egg   要求已经满足(使用--upgrade升级):/ Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests-2.9.1-py3.5.egg中的请求(来自Stockfighter == 0.1)   要求已经满足(使用--upgrade升级):ws4py in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/ws4py-0.3.4-py3.5.egg(from Stockfighter == 0.1)

我对python和github都很陌生,所以任何帮助都会受到赞赏。谢谢!

0 个答案:

没有答案