简体   繁体   English

我如何安装Pygraphics模块

[英]How do I install the Pygraphics module

I am trying to download the Pygraphics module using Python 2.7.6 and have been heretofore unsuccessful. 我正在尝试使用Python 2.7.6下载Pygraphics模块,但迄今为止未成功。 Below I detail the steps I have taken so far. 在下面,我详细介绍了到目前为止已采取的步骤。 Any help with this would be most appreciated. 任何帮助,将不胜感激。

First, I tried the typical install using pip 首先,我尝试使用pip进行典型安装

sudo pip install Pygraphics

When I try to import the module, I receive an error saying ImportError: No module named Pygraphics . 当我尝试导入模块时,收到错误消息ImportError: No module named Pygraphics

To test whether the module was installed I ran the following code: print sorted(["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()]) which showed me all of my installed distributions. 要测试是否已安装该模块,我运行了以下代码: print sorted(["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()]) ,向我展示了所有我安装的发行版。

This code returned the following list of all the distributions and clearly showed that Pygraphics is installed: 这段代码返回了所有发行版的以下列表,并清楚地表明已安装了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']

After this, I tried using the GUI installer located on the following Pygrahpics install website . 之后,我尝试使用位于以下Pygrahpics安装网站上的GUI安装程序。 While going through the installer, I received an error message saying "PyGraphics requires System Python 2.7 to install" despite the fact that I have downloaded Python 2.7.6. 尽管已经下载了Python 2.7.6,但在通过安装程序时,我仍然收到一条错误消息,内容为“ PyGraphics需要安装System Python 2.7”。

At this point I don't know what to do and was hoping someone who may have had a similar issue might be able to help me out. 在这一点上,我不知道该怎么办,并希望可能遇到类似问题的人能够为我提供帮助。

Thank you for your time. 感谢您的时间。

It looks like you've successfully install PyGraphics. 看来您已经成功安装了PyGraphics。 Now import picture :) 现在import picture :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM