I am running a python2 package that uses wx
on a MacBook. I'm running python 2.7.10. When I run the package:
con@company_computer:~/dir/pasta$ python run_pasta_gui.py
Traceback (most recent call last):
File "run_pasta_gui.py", line 27, in <module>
import wx
ImportError: No module named wx
so I try to install wx following advice from Python ImportError: No module named wx
I try to install via pip as also suggested on https://wxpython.org/pages/downloads/index.html:
pip install -U wxPython
&
sudo pip install wxPython
&
sudo -H pip install wxPython
but all of these say that it's already installed:
Requirement already satisfied: wxPython in /usr/local/lib/python2.7/site-packages (4.0.7.post2)
Requirement already satisfied: pillow in /usr/local/lib/python2.7/site-packages (from wxPython) (6.2.2)
Requirement already satisfied: six in /usr/local/lib/python2.7/site-packages (from wxPython) (1.11.0)
Requirement already satisfied: numpy<1.17; python_version <= "2.7" in /usr/local/lib/python2.7/site-packages (from wxPython) (1.14.2)
and yet I get the original error back when I try to run run_pasta_gui.py
I was able to get this done on my Ubuntu VM by sudo apt-get install python-wxtools
but this obviously isn't available on a Mac.
Following Unable to import a module that is definitely installed I've tried sudo chmod -R ugo+rX /usr/local/lib/python2.7/site-packages/
but I'm still unable to access the wx
package.
How can I get wx
working for my python2 installation?