[SOLVED]installing wxpython on python3.6

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
buteman
Level 4
Level 4
Posts: 331
Joined: Tue Nov 29, 2011 5:36 pm
Location: North Lincolnshire

[SOLVED]installing wxpython on python3.6

Post by buteman »

I am trying to install wxpython phoenix for python 3.6 on my Linux Mint 18.2 and am getting a lot of errors.
I have pip 3.6 installed and it runs okay but the install of wxpython fails.

Code: Select all

  sudo -H pip3.6 install wxpython
[sudo] password for buteman: 
Collecting wxpython
  Downloading wxPython-4.0.1.tar.gz (67.9MB)
    100% |████████████████████████████████| 67.9MB 26kB/s  
Checking for header Python.h : :-(
Asking python-config for pyembed --cflags flags : yes
Asking python-config for pyembed --libs flags : yes
Asking python-config for pyembed --ldflags flags : yes
Getting pyembed flags from python-config : yes
Asking python-config for pyext --cflags flags : yes
Asking python-config for pyext --libs flags : yes
Asking python-config for pyext --ldflags flags : yes
Getting pyext flags from python-config : Could not build python extensions
The configuration failed
(complete log in /tmp/pip-build-e9v1g771/wxpython/build/waf/3.6/gtk3/config.log)
Command '"/usr/local/bin/python3.6" /tmp/pip-build-e9v1g771/wxpython/bin/waf-1.7.15-p1 --wx_config=/tmp/pip-build-e9v1g771/wxpython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/local/bin/python3.6" --out=build/waf/3.6/gtk3 configure build ' failed with exit code 1.
Finished command: build_py (0.864s)
Finished command: build (0m1.395s)
Command '"/usr/local/bin/python3.6" -u build.py build' failed with exit code 1.
There is a lot more afterwards but it seems this is the initial error causing the rest of the problems.
I cannot post log because the process cleaned up afterwards and so log not there.
Any help would be appreciated.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
buteman
Level 4
Level 4
Posts: 331
Joined: Tue Nov 29, 2011 5:36 pm
Location: North Lincolnshire

Re: installing wxpython on python3.6

Post by buteman »

I tried to install wxpython by doing

Code: Select all

sudo -H pip3.6 install https://wxpython.org/Phoenix/snapshot-builds/linux/gtk2/ubuntu-16.04/wxPython-4.0.0a3.dev3059+4a5c5d9-cp36-cp36m-linux_x86_64.whl
Which it said it had done successfully
But when I tried it I got this

Code: Select all

python3.6
Python 3.6.4 (default, Mar 13 2018, 17:34:02) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/usr/local/lib/python3.6/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
I tried this with several builds including 4.0.0a2 but all gave the same type of errors.
The same happened with gtk3 builds
I guess I am doing something wrong but what?
buteman
Level 4
Level 4
Posts: 331
Joined: Tue Nov 29, 2011 5:36 pm
Location: North Lincolnshire

Re: installing wxpython on python3.6

Post by buteman »

Sorted it out

Code: Select all

 sudo add-apt-repository ppa:deadsnakes/ppa
 sudo apt-get update  
Then was able to install libpython3.6-dev, which was needed, via package manager.
Locked

Return to “Software & Applications”