@mike
When I try runnning the script in Python 3.7 Shell for some reason it cant find the module.
Traceback (most recent call last):
File “C:\Users\Christian\Desktop\The Summoning\Test.py”, line 1, in
import wx
ModuleNotFoundError: No module named ‘wx’
``
@ Robin Dunn Im pretty sure it is the same python.
Sublime build file:
“cmd”: [“C:\Users\Christian\AppData\Local\Programs\Python\Python37\python.exe”, “-u”, “$file”],
“file_regex”: “^[ ]File "(…?)”, line ([0-9]*)",
“selector”: “source.python”
``
Environment Path variable:
C:\Users\Christian\AppData\Local\Programs\Python\Python37\Scripts
``
As for error messages I get none from launching the test script in sublime, however I do in Python 3.7 Shell.
···
On Friday, May 17, 2019 at 4:02:15 PM UTC-4, Robin Dunn wrote:
Also, make sure that the Python being executed by Sublime is the same Python you used when running pip.
Do you see any error messages or tracebacks?
–
Robin
On Friday, May 17, 2019 at 12:34:09 PM UTC-7, mike wrote:
On Fri, May 17, 2019 at 1:43 PM Christian O. christianoli...@gmail.com wrote:
I’ve been trying for to install wxpython but every time I install it with pip:
C:\Users\Christian>pip install wxPython
Collecting wxPython
Using cached https://files.pythonhosted.org/packages/bd/6e/ce469293cf6f7e391c11ec31161a9d6d0f2acffd05da2fb27bb3b3d81d1e/wxPython-4.0.4-cp37-cp37m-win_amd64.whl
Requirement already satisfied: six in c:\users\christian\appdata\local\programs\python\python37\lib\site-packages (from wxPython) (1.12.0)
Requirement already satisfied: Pillow in c:\users\christian\appdata\local\programs\python\python37\lib\site-packages (from wxPython) (6.0.0)
Installing collected packages: wxPython
Successfully installed wxPython-4.0.4
``
I try to run
import wx
app = wx.App()
frame = wx.Frame(parent=None, title=‘Hello World’)
frame.Show()
app.MainLoop()
``
But every time it builds in sublime, no frame/window appears.
I’m not sure what to do. all the guides online just say to use pip to install and have vs 2015 installed.
Have you tried running the script from cmd.exe? I wonder if sublime is somehow preventing it from running correctly.
Mike Driscoll
Blog: http://blog.pythonlibrary.org
Books: Python 101, Python 201: Intermediate Python, wxPython Recipes, Python Interviews