如何正确安装wxPython? [英] How to properly install wxPython?

查看:226
本文介绍了如何正确安装wxPython?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在四处寻找不同的事情来做Python,比如代码闪烁的文字或定时器,但是当我把它们复制到我的窗口中时,就会出现不断的语法错误。现在,也许你不是直接复制它们,但是我得到的一个错误是'没有模块命名为wx'。我了解到,我可以通过安装wxPython来获得该模块。问题是,我已经尝试了所有4个选项,没有一个为我工作。我下载哪一个,如何使用Windows进行设置?

So I was looking around at different things to do on Python, like code for flashing text or a timer, but when I copied them into my window, there were constant syntax errors. Now, maybe you're not meant to copy them straight in, but one error I got was 'no module named wx'. I learned that I could get that module by installing wxPython. Problem is, I've tried all 4 options and none of them have worked for me. Which one do I download and how do I set it up using Windows?

谢谢

推荐答案

根据主页说明

确保您至少具有6.0.8的点数和12.0.5的setuptools。

Make sure you have at least version 6.0.8 of pip and 12.0.5 for setuptools.

安装要求对于Linux,如readme.rst中所述:

Install requirements for Linux as outlined in the readme.rst at:

    https://github.com/wxWidgets/Phoenix/blob/master/README.rst 

安装wxPython-Phoenix(Linux):

Install wxPython-Phoenix (Linux):

       sudo pip install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix 

安装wxPython-Phoenix(Windows,使用相应的脚本文件夹):

Install wxPython-Phoenix (Windows, use the appropriate script folder):

       C:\python27\scripts\pip.exe install --upgrade  --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix 

这篇关于如何正确安装wxPython?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆