About wxPython

Introduction

It's not a big story, but I was addicted to it for about an hour, so I made a note as a memorandum. What I tried this time was when I got a request to debug a program using Mayavi, so when preparing the environment I was addicted to the need to install wxPython.

environment

The environment used by pyenv can be switched. The environment this time is Anaconda-2.4.4.0.

What i did

I installed it by simply hitting the following command to install Mayavi.

python


conda install -c anaconda mayavi

First of all, I got Mayavi itself, but an error occurred in a module called Traits. The reason is that there are not enough modules. I had no choice but to look for the missing module and it was wxPython, so I installed it with the following command.

python


conda install -c anaconda wxpython

Well, does this work? When I thought about it, the following error message was displayed.

This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the main display of your Mac.

Hmmm, the path is normal, and I can confirm that it is included in the conda list, and what is this? I asked Google Sensei and looked at everyone's Q & A, but none of them came to a solution ...

Conclusion

I finally found the exchange in the Google group.

Here, the answer from Travis Oliphant is as follows.

Anaconda is not a Framework build of python. However, you should be able to still run the program using "pythonw" which runs python with the correct options to run the GUI.

pythonw simple.py

It should be on your PATH

Is that so. It seems that there is no such thing as'Framework build of python'on Anaconda. So, if you want to move it, you need to run it with python w.

And

python


pythonw main.py

When I moved it as, it worked properly (∩ ・ ∀ ・) ∩

Recommended Posts

About wxPython
About LangID
About virtiofs
About python-apt
About Permission
About sklearn.preprocessing.Imputer
About gunicorn
About requirements.txt
About locale
About Opencv ②
About axis = 0, axis = 1
About Opencv ③
About import
About numpy
About pip
About Linux
About numpy.newaxis
About endian
About Linux
About import
About Opencv ①
About Linux
About Linux ①
About cv2.imread
About python slices
About python comprehension
About Docker Volume
[Linux] About export
About reference type
About Twitter scraping
About the test
Learn about programming
About Flask customization
About variable scope. .. ..
About Python tqdm.
About python yield
Notes about with
About python, class
About Linear Models
About Go functions
About pandas describe
About Kivy root
About Firestore timeout
About python inheritance
About python, range ()
[Linux] About PATH
About python decorators
Linux (about groups)
Note about awk
About python reference
About Bitnami Autostart
About Python decorators
Notes about pytorch
[Python] About multi-process
About Numpy broadcast
About symbolic links
Memorandum about validation
About Go Interface
About Django's ProxyModel
About the queue