WxPython 4.0.1 configuration failed

165 views
Skip to first unread message

QWERTY_Code

unread,
Feb 12, 2018, 2:41:50 PM2/12/18
to wxPython-users

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
config(3.6).log

QWERTY_Code

unread,
Feb 12, 2018, 2:43:11 PM2/12/18
to wxPython-users
Sorry about the formating.

Robin Dunn

unread,
Feb 12, 2018, 7:18:13 PM2/12/18
to wxPython-users
On Monday, February 12, 2018 at 11:41:50 AM UTC-8, QWERTY_Code wrote:

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 https://github.com/wxWidgets/Phoenix.git, 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, https://pypi.python.org/pypi/wxPython. Even easier would be to let pip do it all for you, such as what is documented here: https://wxpython.org/blog/2017-08-17-builds-for-linux-with-pip/index.html


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?

 -- 
Robin Dunn
Software Craftsman

QWERTY_Code

unread,
Feb 12, 2018, 9:57:29 PM2/12/18
to wxPython-users
No I didn't. I ran this command:

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

Robin Dunn

unread,
Feb 12, 2018, 10:29:17 PM2/12/18
to wxPython-users
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


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.

QWERTY_Code

unread,
Feb 15, 2018, 9:19:08 PM2/15/18
to wxPython-users


On Monday, February 12, 2018 at 9:29:17 PM UTC-6, Robin Dunn wrote:
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


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 "<stdin>", line 1, in <module>
 
File "build/bdist.linux-x86_64/egg/setuptools/__init__.py", line 10, in <module>
 
File "build/bdist.linux-x86_64/egg/setuptools/extern/__init__.py", line 1, in <module>
 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 77, in <module>
 
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 "<stdin>", line 1, in <module>
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 <module>
   
from pkg_resources import load_entry_point
 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 77, in <module>
 
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!

QWERTY_Code

unread,
Feb 15, 2018, 9:56:17 PM2/15/18
to wxPython-users
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.

Robin Dunn

unread,
Feb 19, 2018, 4:56:13 PM2/19/18
to wxPython-users


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?

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.

QWERTY_Code

unread,
Mar 3, 2018, 10:50:05 AM3/3/18
to wxPython-users


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.

 

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. :)
build.log

Robin Dunn

unread,
Mar 3, 2018, 10:39:39 PM3/3/18
to wxPython-users


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. :)

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. 

QWERTY_Code

unread,
Mar 4, 2018, 7:20:42 PM3/4/18
to wxPython-users


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

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

unread,
Mar 5, 2018, 1:55:39 AM3/5/18
to wxpytho...@googlegroups.com
On Mar 4, 2018, at 4:20 PM, QWERTY_Code <Webthi...@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?????

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.

QWERTY_Code

unread,
Mar 5, 2018, 8:44:55 AM3/5/18
to wxPython-users


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.


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

Tim Roberts

unread,
Mar 5, 2018, 11:14:13 AM3/5/18
to wxpytho...@googlegroups.com
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

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.
-- 
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

QWERTY_Code

unread,
Mar 8, 2018, 7:35:07 PM3/8/18
to wxPython-users


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.

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:
# Environment variables
#EDITOR="$EDITOR"
TMPDIR="/home/steve/yaourt"   <<<<<<< THIS LINE
#VISUAL="$VISUAL"

3)Restart

4)Enjoy!
SSD_Partition.png
hello_world.png

Tim Roberts

unread,
Mar 9, 2018, 1:35:47 PM3/9/18
to wxpytho...@googlegroups.com
QWERTY_Code wrote:

the command steps:
to do this with yaourt:

1)Run sudo nano
/etc/yaourtrc

2)Edit this:
# Environment variables
#EDITOR="$EDITOR"
TMPDIR="/home/steve/yaourt"   <<<<<<< THIS LINE
#VISUAL="$VISUAL"

3)Restart
4)Enjoy!

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!
Reply all
Reply to author
Forward
0 new messages