如何安装Pygraphics模块

时间:2015-01-09 22:35:14

标签: python python-2.7 pygraphics

我正在尝试使用Python 2.7.6下载Pygraphics模块,并且迄今为止都没有成功。下面我详细介绍了目前为止所采取的步骤。对此有任何帮助将非常感激。

首先,我尝试使用pip

进行典型安装

sudo pip install Pygraphics

当我尝试导入模块时,收到错误ImportError: No module named Pygraphics

为了测试模块是否已安装,我运行了以下代码:print sorted(["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()]),它显示了我所有已安装的发行版。

此代码返回了以下所有发行版的列表,并清楚地显示了Pygraphics已安装:

['altgraph==0.10.2', 'bdist-mpkg==0.5.0', 'bonjour-py==0.3', 'brewer2mpl==1.4', 'certifi==14.05.14',     'datetime==4.0.1', 'flask==0.10.1', 'ggplot==0.6.5', 'ipython==2.0.0-dev', 'itsdangerous==0.24', 'jdcal==1.0', 'jinja2==2.7.3', 'macholib==1.5.1', 'markupsafe==0.23', 'matplotlib==1.4.x', 'mock==1.0.1', 'modulegraph==0.10.4', 'nose==1.3.4', 'numpy==1.9.0.dev-297f54b', 'openpyxl==2.1.2', 'pandas==0.14.1', 'pandasql==0.6.1', 'patsy==0.3.0', 'pika==0.9.14', 'py2app==0.7.3', 'pygments==1.6', 'pygraphics==2.1']

在此之后,我尝试使用位于以下Pygrahpics install website的GUI安装程序。在浏览安装程序时,我收到一条错误消息“PyGraphics需要安装System Python 2.7”,尽管我已经下载了Python 2.7.6。

此时我不知道该怎么做,并希望有可能遇到类似问题的人可以帮助我。

感谢您的时间。

1 个答案:

答案 0 :(得分:0)

看起来你已经成功安装了PyGraphics。现在import picture:)