LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-01-2005, 09:12 AM   #1
griever33127
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
Exclamation wxpython not working


after i install wxpython, it doesnt work for me what can i do when i try to use this is what it tells me

root@mshome:~/ABC-Linux-V.2.4.3# python abc.py
Traceback (most recent call last):
File "abc.py", line 2, in ?
from wxPython.wx import *
ImportError: No module named wxPython.wx
root@mshome:~/ABC-Linux-V.2.4.3#


someone help me plz
 
Old 10-01-2005, 02:38 PM   #2
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
How did you install it? Did you build from source or install someone elses package? Last I checked, WxPython doesn't come with Slackware and it can be a tricky program to compile right.
 
Old 10-01-2005, 05:02 PM   #3
griever33127
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Exclamation

i tried it through both means,source and package, and its messed up its one of the primary programs i need to run, i have a modded xbox so u see where im going with this, i need bit torrent, and it need wxpython to run

Last edited by griever33127; 10-01-2005 at 05:07 PM.
 
Old 10-01-2005, 05:54 PM   #4
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Well, you can try my slack-build script for wxPython if you want... It always works for me, and should be the correct way to build wxpython..

Code:
#!/bin/sh
#
# If you have an Nvidia driver installed, the make will probably
# bomb out. Uninstall Nvidia or remove opengl from configure...

CWD=`pwd`
TMP=/tmp
PKG=$TMP/package-wxPython
VERSION=2.6.1.0
# I set my CFLAGS globaly..
ARCH=i486
BUILD=1

rm -rf $PKG
mkdir -p $PKG/install
mkdir -p $PKG/usr/share/{applications,pixmaps}

echo
echo "wxPython-src-$VERSION.tar.gz is now extracting..."
echo
cd $TMP
rm -rf wxPython-src-$VERSION
tar -xzf $CWD/wxPython-src-$VERSION.tar.gz

#################################
# Configure and build wxWidgets #
#################################
cd $TMP/wxPython-src-$VERSION
mkdir bld
cd bld
../configure --prefix=/usr \
        --with-gtk=2 \
	--enable-monolithic \
	--disable-rpath \
	--with-opengl \
	--enable-geometry \
	--enable-optimise \
	--enable-sound 	--with-sdl \
	--enable-display \
	--enable-unicode \
	--enable-debug_flag \
	--disable-debugreport

make 
make -C contrib/src/animate 
make -C contrib/src/gizmos 
make -C contrib/src/stc


##################
# Build wxPython #
##################
cd $TMP/wxPython-src-$VERSION/wxPython
python setup.py \
	WXPORT=gtk2 \
	UNICODE=1 \
	EP_ADD_OPTS=1 \
	WX_CONFIG="$TMP/wxPython-src-$VERSION/bld/wx-config --no_rpath" \
       	build_ext --rpath=/usr/lib \
	build

##############################
# Install wxGTK and contribs #
##############################
cd $TMP/wxPython-src-$VERSION/bld
make prefix=$PKG/usr install
make -C contrib/src/animate prefix=$PKG/usr install
make -C contrib/src/gizmos prefix=$PKG/usr install
make -C contrib/src/stc prefix=$PKG/usr install


##############################
# Install wxPython for wxGTK #
##############################
cd $TMP/wxPython-src-$VERSION/wxPython
python setup.py \
	WXPORT=gtk2 \
	UNICODE=1 \
	EP_ADD_OPTS=1 \
	WX_CONFIG="$PKG/usr/bin/wx-config --prefix=$PKG/usr --no_rpath" \
       	build_ext --rpath=/usr/lib \
	install --root=$PKG

# Menu items
for file in distrib/*.desktop; do
install -m 644 $file	$PKG/usr/share/applications
done

# Icons
install -m 644 wx/py/PyCrust_32.png		$PKG/usr/share/pixmaps/PyCrust.png
install -m 644 wx/tools/XRCed/XRCed_32.png	$PKG/usr/share/pixmaps/XRCed.png

( cd $PKG
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null )

cat << EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

        |-----handy-ruler----------------------------------------------------|
wxPython: wxPython (Python GUI development)
wxPython:
wxPython: wxPython is a GUI toolkit for the Python programming language. It
wxPython: allows Python programmers to create programs with a robust, highly
wxPython: functional graphical user interface, simply and easily. It is
wxPython: implemented as a Python extension module (native code) that wraps
wxPython: the popular wxWidgets cross platform GUI library, which is written
wxPython: in C++.
wxPython:
wxPython:
wxPython:
EOF

# Fix a broken symlink:
( cd $PKG/usr/bin
  rm -rf wx-config
  ln -sf ../lib/wx/config/gtk2-unicode-debug-2.6 wx-config )

# Build the package:
cd $PKG
makepkg -l y -c n $TMP/wxPython-$VERSION-$ARCH-$BUILD.tgz
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wxPython merchtemeagle Linux - Software 3 02-23-2005 10:50 AM
SuSE 9.1 and wxPython 2.5.x jasonM Programming 0 10-15-2004 08:58 PM
wxPython xlord Programming 0 05-23-2004 04:12 PM
wxPython. vexer Slackware 5 09-22-2003 03:11 PM
wxPython Filsta Linux - Software 0 08-20-2002 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration