WxPython 4.0.1 configuration failed

Hello!
I am trying to install wxpython as a window management system for my
projects instead of pygame, but I am having some problems. I started
out using pip to install, but that didn’t work. Then I downloaded
the package with pip to a tmp folder to install manuly. Still no
seccess. Then I tried to download the phenyx project from github.com,
but I couldn’t unpack it because the release is a .git file and
unfortinely it downloaded it as a .zip. Of the two methods I tried, I
got the same error in both, So it is eather a dependincey issue, or a
problem with wxPython it self. In conclusion, I would like some
guideness on downloading .git files from github, and some help
debuging the installation process.

p.s.
I would like to install wxPython on both python 2.7 and 3.6.

The
information on my environment is included below:

OS
is KDE Neon 5.11.5 running on Linux kernel 4.13.0-32-generic

python
2.7.14 installed at /usr/local

python
3.6.4 installed at /usr/local

(I
had accidentally changed the permission structure of /usr while trying to
get 2.7.14 installed, sooo that might have messed something up. I did
‘chown -R root:root /usr’, seems fine now.)

I
have these Prerequisites installed:

dpkg-dev

build-essential

libjpeg-dev

libtiff-dev

libsdl1.2-dev

libgstreamer-plugins-base0.10-dev

libnotify-dev

freeglut3

freeglut3-dev

libsm-dev

libgtk-3-dev

libwebkitgtk-3.0-dev

libgtk2.0-dev

libwebkitgtk-dev

libwebkitgtk-3.0-dev

And these pip2 and pip3 packages:

alabaster (0.7.10)

apipkg (1.4) --2.7 only

appdirs (1.4.3)
attrs (17.4.0)
Automat (0.6.0)
Babel (2.5.3)
blessings (1.6.1)
bpython (0.17)
buildtools (1.0.6)
certifi (2018.1.18)

chardet (3.0.4)

configparser (3.5.0) --3.6 only

constantly (15.1.0)
curtsies (0.2.11)
docopt (0.6.2)
docutils (0.14)
execnet (1.5.0)

funcsigs (1.0.2) --2.7 only

furl (1.0.1)

future (0.16.0) --3.6 only

greenlet (0.4.13)
hyperlink (17.3.1)
idna (2.6)
imagesize (0.7.1)
incremental (17.5.0)

jedi (0.11.1) --3.6 only

Jinja2 (2.10)

json-rpc (1.10.8) --3.6 only

MarkupSafe (1.0)

mccabe (0.6.1) --3.6 only

numpy (1.14.0)
orderedmultidict (0.7.11)

parso (0.1.1) --3.6 only

pip (9.0.1)
pkginfo (1.4.1)
pluggy (0.6.0)
py (1.5.2)

pycodestyle (2.3.1) --3.6 only

pydocstyle (2.1.1) --3.6 only
pyflakes (1.6.0) --3.6 only
pygame (1.9.3) --3.6 only

Pygments (2.2.0)

pyserial (3.4)
pytest (3.4.0)
pytest-forked (0.2)
pytest-timeout (1.2.1)
pytest-xdist (1.22.0)
python-dateutil (2.6.1)

python-language-server (0.13.0) --3.6 only

pytz (2017.3)
pyusb (1.0.2)
redo (1.6)
requests (2.18.4)
requests-toolbelt (0.8.0)

rope (0.10.7) --3.6 only

scipy (1.0.0)
setuptools (38.4.0)
SimpleCV (1.3)
simplejson (3.13.2)
six (1.11.0)
snowballstemmer (1.2.1)
Sphinx (1.6.7)
sphinxcontrib-websupport (1.0.1)
SQLAlchemy (1.2.2)
tqdm (4.19.5)
twine (1.9.1)
Twisted (17.9.0)

typing (3.6.4) --2.7 only

urllib3 (1.22)
wcwidth (0.1.7)
wheel (0.30.0)
zope.interface (4.4.3)

I
have also included the config.logs for when i did it manually.

config(2.7).log (23.8 KB)

config(3.6).log (28.5 KB)

Sorry about the formating.

Hello!
I am trying to install wxpython as a window management system for my
projects instead of pygame, but I am having some problems. I started
out using pip to install, but that didn’t work. Then I downloaded
the package with pip to a tmp folder to install manuly. Still no
seccess. Then I tried to download the phenyx project from github.com,
but I couldn’t unpack it because the release is a .git file and
unfortinely it downloaded it as a .zip. Of the two methods I tried, I
got the same error in both, So it is eather a dependincey issue, or a
problem with wxPython it self. In conclusion, I would like some
guideness on downloading .git files from github, and some help
debuging the installation process.

You need to use git to fetch from URLs like GitHub - wxWidgets/Phoenix: wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before., and what it gives you is not just an archive full of files, but the whole source version control repository. If you don’t know what that is or how to use it then you don’t want to use that URL. An easier option would be to just download the source archive from the PyPI page, wxPython · PyPI. Even easier would be to let pip do it all for you, such as what is documented here: Building wxPython for Linux via Pip | wxPython

p.s.
I would like to install wxPython on both python 2.7 and 3.6.

The
information on my environment is included below:

OS
is KDE Neon 5.11.5 running on Linux kernel 4.13.0-32-generic

python
2.7.14 installed at /usr/local

python
3.6.4 installed at /usr/local

(I
had accidentally changed the permission structure of /usr while trying to
get 2.7.14 installed, sooo that might have messed something up. I did
‘chown -R root:root /usr’, seems fine now.)

From the logs it looks like something is wrong with your pythons. If you built them yourself did you use the --enable-shared option when running Python’s configure?

···

On Monday, February 12, 2018 at 11:41:50 AM UTC-8, QWERTY_Code wrote:

Robin Dunn

Software Craftsman

No I didn’t. I ran this command:

./configure --with-zlib=yes --prefix=/usr/local --enable-optimizations

``

···

From the logs it looks like something is wrong with your pythons. If you built them yourself did you use the --enable-shared option when running Python’s configure?

Robin Dunn

Software Craftsman

http://wxPython.org

Try again with adding --enable-shared, rebuild and reinstall. That option is typically used for the Pythons available from linux system repositories, and many (perhaps all) binary extension modules for linux are built in a way that assumes Python was built with the shared library option. The errors in the config log are due to waf testing the Python installation by trying to build a program that embeds Python which expects to see the Python APIs available due to the shared library having been loaded.

···

On Monday, February 12, 2018 at 6:57:29 PM UTC-8, QWERTY_Code wrote:

No I didn’t. I ran this command:

./configure --with-zlib=yes --prefix=/usr/local --enable-optimizations

``

Robin Dunn

Software Craftsman

Try again with adding --enable-shared, rebuild and reinstall. That option is typically used for the Pythons available from linux system repositories, and many (perhaps all) binary extension modules for linux are built in a way that assumes Python was built with the shared library option. The errors in the config log are due to waf testing the Python installation by trying to build a program that embeds Python which expects to see the Python APIs available due to the shared library having been loaded.

Robin Dunn

Software Craftsman

http://wxPython.org

I reinstalled python with that option, and python 3 works fine. But when ever I try to import something in python 2 I get this error:

import setuptools
Traceback (most recent call last):
File “”, line 1, in
File “build/bdist.linux-x86_64/egg/setuptools/init.py”, line 10, in
File “build/bdist.linux-x86_64/egg/setuptools/extern/init.py”, line 1, in
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 77, in
File “build/bdist.linux-x86_64/egg/pkg_resources/extern/init.py”, line 61, in load_module
ImportError: The ‘packaging.requirements’ package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.

``

It is installed by looks of it but something is missing because if I import a module that was not previously installed:

import pygame
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named pygame

``

this what happens when I run pip:

user@user-computer:~$ pip
Traceback (most recent call last):
File “/usr/local/bin/pip”, line 6, in
from pkg_resources import load_entry_point
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 77, in
File “build/bdist.linux-x86_64/egg/pkg_resources/extern/init.py”, line 61, in load_module
ImportError: The ‘packaging.requirements’ package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.

``

I have not tried installing wxpython on python3 yet so your suggestion it might have fixed it.

-Thanks for your time!

···

On Monday, February 12, 2018 at 9:29:17 PM UTC-6, Robin Dunn wrote:

I should also add it installed 2.7.12 instead of 2.7.14, and I would like the latter used by default. I did use the 2.7.14 source code, So I am not sure what happened 2.7.12 is the OS’ pre-installed python. Did the --enable-shared play a part in this?

And do you know of a way to safely remove or upgrade the pre-installed python2 (2.7.12 -> 2.7.14)? if you do ‘apt-get remove python’ it also removes EVERYTHING THAT USES IT.

Perhaps. The Python build should have set things up so the Python executable is able to find the correct version of the shared library, but if not you may need to set LD_LIBRARY_PATH to help it out.

···

On Thursday, February 15, 2018 at 6:56:17 PM UTC-8, QWERTY_Code wrote:

I should also add it installed 2.7.12 instead of 2.7.14, and I would like the latter used by default. I did use the 2.7.14 source code, So I am not sure what happened 2.7.12 is the OS’ pre-installed python. Did the --enable-shared play a part in this?

Robin Dunn

Software Craftsman

Update: Hi! it has been a bit so hear are some things i have done. Long story short, i reinstalled my OS to manjaro hoping this time i’d get it right from the start. i have been following this tutorial on the wxpy website, and i’ve run into a problem that i’m not sure how to fix. I have been using the virtual environment to test this like it says. i’ll attatch the build log with this. I didn’t install libwebkitgtk becuase I am not sure how to on an arch based system. If someone here can tell me how that would be great. :slight_smile:

build.log (429 KB)

···

On Monday, February 19, 2018 at 3:56:13 PM UTC-6, Robin Dunn wrote:

Perhaps. The Python build should have set things up so the Python executable is able to find the correct version of the shared library, but if not you may need to set LD_LIBRARY_PATH to help it out.

As it states in your log you’ve run out of disk space, but you will need libwebkitgtk as we don’t have a way yet to not make it necessary in the wxPython build.

···

On Saturday, March 3, 2018 at 7:50:05 AM UTC-8, QWERTY_Code wrote:

Update: Hi! it has been a bit so hear are some things i have done. Long story short, i reinstalled my OS to manjaro hoping this time i’d get it right from the start. i have been following this tutorial on the wxpy website, and i’ve run into a problem that i’m not sure how to fix. I have been using the virtual environment to test this like it says. i’ll attatch the build log with this. I didn’t install libwebkitgtk becuase I am not sure how to on an arch based system. If someone here can tell me how that would be great. :slight_smile:

Robin Dunn
Software Craftsman
http://wxPython.org

I now have libwebkitgtk installed, so i try it again, but is says it ran out of space. I tried it without the virtual environment thinking that might be messing sometihng up. But again, it failed because of not eough space. I have 18 GB of space though. does it need more then 18 GB???

···

On Saturday, March 3, 2018 at 9:39:39 PM UTC-6, Robin Dunn wrote:

As it states in your log you’ve run out of disk space, but you will need libwebkitgtk as we don’t have a way yet to not make it necessary in the wxPython build.

Robin Dunn
Software Craftsman
http://wxPython.org

It is out of room on the /tmp volume. Is that a separate -- and possibly smaller -- volume? Notice that it failed trying to create the pre-compiled header files, which can be large.

···

On Mar 4, 2018, at 4:20 PM, QWERTY_Code <WebthingsIgot@zoho.com> wrote:

I now have libwebkitgtk installed, so i try it again, but is says it ran out of space. I tried it without the virtual environment thinking that might be messing sometihng up. But again, it failed because of not eough space. I have 18 GB of space though. does it need more then 18 GB???


Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

so how do i make it bigger or use a different folder

···

On Monday, March 5, 2018 at 12:55:39 AM UTC-6, Tim Roberts wrote:

It is out of room on the /tmp volume. Is that a separate – and possibly smaller – volume? Notice that it failed trying to create the pre-compiled header files, which can be large.


Tim Roberts, ti...@probo.com

Providenza & Boekelheide, Inc.

Well, that’s a system administration issue for you. I don’t know
how your drives are partitioned. You said this was a small embedded
system, right? Sometimes, if the system drive is a flash drive,
they’ll configure things so that /tmp gets assigned to a RAM drive.
If you don’t have enough RAM to make a large enough scratch drive, I
suppose you could repartition things to leave /tmp in the root
filesystem, even with the churn.
Potentially, in the short term, you could just try to umount /tmp.
That should move the folder to the main drive temporarily.

···

QWERTY_Code wrote:

    On Monday, March 5, 2018 at 12:55:39 AM UTC-6, Tim Roberts

wrote:

      It is

out of room on the /tmp volume. Is that a separate – and
possibly smaller – volume? Notice that it failed trying to
create the pre-compiled header files, which can be large.

      so how do i make it bigger or use a different folder
-- Tim Roberts, Providenza & Boekelheide, Inc.

timr@probo.com

# Environment variables
``

#EDITOR="$EDITOR"
TMPDIR="/home/steve/yaourt"   <<<<<<< THIS LINE
#VISUAL="$VISUAL"

``

Hi again! I am not sure what you mean by 'embedded

system’ (I’ll inculde a picture of my pertition table), But I now have wxPython installed!

I did some research on the /tmp folder and I found at least on manjaro (maybe other distros) that the tmp is by defaut half the size of RAM size(2 GB /tmp for 4 GB RAM). More on this can be found here. This forum question talks about chaging environment variables` for yaourt, and I woundered if you can do it system wide. turns out you can! I followed this forum post changed where the tmp folder gets redirected to, and continued on with step 4: building the wx wheel. It was a success! I did the hello world test and that worked fine. If anyone else is reading this for guideness, if the above methods don’t work, you could delete the /tmp folder and then replace it with a symbolic link to a folder somewhere else, but I would not recomend this meathod unless all else fails or you know what your doing (Here is a forum with steps on how to do this).

One last thing. I tried the hello world 2 and the text inside the window did not render quite right (pic attached).
I found out that there is a package in the AUR (Arch User Repository) for wxpython but i still would have had to change the /tmp ```directory`

the command steps:

1)Run: “sudo nano /etc/environment”

2)Add “TEMP=/path/to/directory” <-(not exactly that. something like:"```TEMP=/home/your-user-name/tmp"` )

3)Restart computer!

4)You now have a temporary folder that can now be able to take up your entire disk space!

to do this with yaourt:

1)Run sudo nano ``/etc/yaourtrc

2)Edit this:

3)Restart

4)Enjoy!


![SSD_Partition.png|552x501](upload://u0TI4FSISdfv87OCY5Di8jtv0LB.png)



![hello_world.png|1186x579](upload://6s7v5JR1E5q10mzXPi5hgNH9X2C.png)



<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

On Monday, March 5, 2018 at 10:14:13 AM UTC-6, Tim Roberts wrote:

>     Well, that's a system administration issue for you.  I don't know
> how your drives are partitioned.

>     .... I
> suppose you could repartition things to leave /tmp in the root
> filesystem, even with the churn.
> 
> 
> 
>     Potentially, in the short term, you could just try to umount /tmp. 
> That should move the folder to the main drive temporarily.
> ```
> -- Tim Roberts, ti...@probo.com
> Providenza & Boekelheide, Inc.
> ```

</details>

Thanks for sharing your recipe. Now that you have finished the
build, you should delete that line, and go back to /tmp on the RAM
disk. Putting your temp directory on the flash disk causes a lot of
unnecessary flash wear. Remember, flash memory has a limited
lifetime!

···

QWERTY_Code wrote:

``

    ``

# Environment variables

                ``
#EDITOR="$EDITOR"
TMPDIR="/home/steve/yaourt"   <<<<<<< THIS LINE
#VISUAL="$VISUAL"

``

` the
command steps:

        ``to do this with yaourt:



          1)Run sudo nano ``/etc/yaourtrc



          2)Edit this:


          3)Restart

          4)Enjoy!

        `
-- Tim Roberts, Providenza & Boekelheide, Inc.

timr@probo.com