Python ImportError: No module named wx

后端 未结 15 1810
余生分开走
余生分开走 2020-12-13 05:56

Im sorry to ask this question again. I have searched and found endles repeats of it both on stackoverflow and also on general google search. Unfortunatly I just cant get my

相关标签:
15条回答
  • 2020-12-13 06:29

    If you do not have wx installed on windows you can use :

     pip install wx
    
    0 讨论(0)
  • 2020-12-13 06:30

    I too face the same problem, I like to share which I was faced so it can be helpful for anyone. In my case I have installed both python2. 7 and python3, and tested the application in python3 after some analysis I used

    pip show wxpython-common

    to find the location of wx which was in

    /usr/lib/python2.7/dist-packages

    so i understood in my case wx will work only in python2.7 environment

    0 讨论(0)
  • 2020-12-13 06:31

    I had the same problem for a PyMOL plugin that required the wx module, though I installed wxpython by downloading its package from here (Unofficial Windows Binaries for Python Extension Packages) and installing it with the command:

    pip install .\wxPython-3.0.2.0-cp27-none-win_amd64.whl
    

    For some reason it gave me that error, for which I uninstalled it with:

    pip uninstall wxPython
    

    and then I downloaded it from here (wxPython 4.0.0a1) and reinstalled:

    pip install .\wxPython-4.0.0a1-cp27-cp27m-win_amd64.whl
    

    The error at this point has not been presented anymore.

    0 讨论(0)
  • 2020-12-13 06:32

    I restart the IDLE and works for me!

    0 讨论(0)
  • 2020-12-13 06:34

    Ubuntu:

    sudo apt-get install python-wxtools
    
    0 讨论(0)
  • 2020-12-13 06:35

    Windows:

    1. Go to C:\Python27\Lib\site-packages\ find the folder wx-<version>-msw or similar

    2. Move the wx from the above folder to C:\Python27\Lib\site-packages\

    0 讨论(0)
提交回复
热议问题