我安装了Ipython并且IDE运行正常。从mac终端的命令行我也使用easy_install命令安装了ipythonblocks:
easy_install ipythonblocks
有关说明,请点击ipythonblocks
ipythonblocks只在ipython笔记本中运行。我也尝试过笔记本电脑,但我的Chrome网页界面并没有让我买到笔记本电脑:
运行ipython notebook'从命令行生成此localhost网页:
我的问题是,无论何时执行以下简单脚本,都会失败:
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
from ipythonblocks import BlockGrid
print "hello everyone."
grid = BlockGrid.from_web('zcezcM')
the error that i see in the console is the following:
runfile('/Users/christopher/.spyder2/temp.py', wdir='/Users/christopher/.spyder2')
Traceback (most recent call last):
File "<ipython-input-18-bfba2859d45e>", line 1, in <module>
runfile('/Users/christopher/.spyder2/temp.py', wdir='/Users/christopher/.spyder2')
File "/Users/christopher/anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 682, in runfile
execfile(filename, namespace)
File "/Users/christopher/anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 78, in execfile
builtins.execfile(filename, *where)
File "/Users/christopher/.spyder2/temp.py", line 8, in <module>
from ipythonblocks import BlockGrid
ImportError: No module named ipythonblocks
我的最终目标是确认已安装ipythonblocks,并且我能够直观地运行它并查看脚本的结果。