I am trying to install the wxPython 4 on my Ubuntu 18.04 machine.
sudo pip install wxpython
I get this warning first
The directory '/home/user/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/user/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
and eventually error
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-SyaTU1/wxpython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-bzIjlK/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-SyaTU1/wxpython/
I had similar problem with wxPython3 and the solution was to install it with get
sudo apt-get install python-wxgtk-3.0
I also was able to install wxPython 4 for Python 3 but not for Python 2.7 (instructions)
Also, I am very confused why it takes so much CPU to install wxpython
sudo pip install wxpython