嗨,我是Python新手,我想使用一个已经开发的工具/代码,我对所使用的模块有问题。我用Python的Anaconda版本安装了Spider
我试图运行以下代码,
如果我正确理解了代码,那么它引用的是下面的自定义模块https://code.google.com/p/quantandfinancial/source/browse/trunk/structures/quote.py?r=25
我将代码的两部分存储在C:\Users\Michal\Documents\Python Scripts中,Python安装在C:\Anaconda3中,当我运行该代码时,会得到一个错误
File "C:/Users/Michal/Documents/Python Scripts/Black-Litterman.py", line 4, in <module>
from structures.quote import QuoteSeries
ImportError: No module named 'structures'请帮助我如何运行这段代码?
发布于 2016-01-14 13:42:34
pip安装结构从普通windows cmd为我工作。
C:\Users\user>pip安装结构
您使用的是pip版本7.0.3,但是版本7.1.2是可用的。您应该考虑通过'python -m pip install --upgrade pip'命令进行升级。
> Collecting structures
> Downloading structures-2.0.2.tar.bz2
> Installing collected packages: structures
> Running setup.py install for structures
> Successfully installed structures-2.0.2发布于 2015-11-23 22:50:20
你需要这样做:
pip install structures最好的方法可能是首先使用 environment,然后您可以管理您需要的所有包。
https://stackoverflow.com/questions/33881982
复制相似问题