Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 804787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:58:32+00:00 2026-05-14T23:58:32+00:00

I’m trying to install PySide v0.3.1 in Mac OS X, for Qt development in

  • 0

I’m trying to install PySide v0.3.1 in Mac OS X, for Qt development in python.

As a pre-requisite, I have installed CMake and the Qt SDK.

I have gone through the documentation and come up with the following installation script:

export PYSIDE_BASE_DIR="<my_dir>"

export APIEXTRACTOR_DIR="$PYSIDE_BASE_DIR/apiextractor-0.5.1"
export GENERATORRUNNER_DIR="$PYSIDE_BASE_DIR/generatorrunner-0.4.2"
export SHIBOKEN_DIR="$PYSIDE_BASE_DIR/shiboken-0.3.1"
export PYSIDE_DIR="$PYSIDE_BASE_DIR/pyside-qt4.6+0.3.1"
export PYSIDE_TOOLS_DIR="$PYSIDE_BASE_DIR/pyside-tools-0.1.3"

pushd .

cd $APIEXTRACTOR_DIR
cmake . 

cd $GENERATORRUNNER_DIR
cmake -DApiExtractor_DIR=$APIEXTRACTOR_DIR .

cd $SHIBOKEN_DIR
cmake -DApiExtractor_DIR=$APIEXTRACTOR_DIR -DGeneratorRunner_DIR=$GENERATORRUNNER_DIR .

cd $PYSIDE_DIR
cmake -DShiboken_DIR=$SHIBOKEN_DIR/libshiboken -DGENERATOR=$GENERATORRUNNER_DIR .

cd $PYSIDE_TOOLS_DIR
cmake .

popd

Now, I don’t know if this installation script is ok, but apparently everything works fine. Each component (apiextractor, generatorrunner, shiboken, pyside-qt and pyside-tools) gets compiled into its own directory.

The problem is that I don’t quite understand how PySide gets into the system’s python environment. In fact, when I start a python shell, I cannot import PySide:

>>> import PySide
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named PySide

Note: I am aware of the Installing PySide – OSX question, but that question is not relevant anymore, because it is about a specific a dependency on the Boost libraries, but with version 0.3.0 PySide moved from a Boost based source code to a CPython one.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:58:32+00:00Added an answer on May 14, 2026 at 11:58 pm

    I don’t have any MacOS experience but assuming it’s similar to any *nix, let’s go:

    About the script: Isn’t it missing some “make, make install” commands? The version you posted just run cmake to configure the build. Also for testing, I set -DCMAKE_INSTALL_PREFIX= for all modules. That way everything is installed in the same place and CMake takes care of finding them for me, as long as I used the same install prefix for each one. The directory layout in your script is quite complicated and mixes build and source directories.

    About finding PySide: once everything is properly compiled and installed, the directory where the “PySide” directory was installed must be available in the PYTHONPATH variable. In the example below,

    Here’s a simple version of a build script(works on Ubuntu):

    #!/bin/bash
    
    BUILD_ROOT=/tmp/pyside-build
    INSTALL_PREFIX=/tmp/sandbox
    
    function build_module {
        cd $BUILD_ROOT
        echo Cloning project $1 from url $2
        git clone --depth 1 $2 $BUILD_ROOT/$1
    
        BUILD_DIR=$BUILD_ROOT/$1/build
        mkdir -p $BUILD_DIR
        cd $BUILD_DIR
    
        echo Configuring $1 build.
        cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ..
    
        echo Configured $1. Starting build.
        make LD_LIBRARY_PATH=$INSTALL_PREFIX/lib
    
        echo Built $1. Installing.
        make install
        echo Successfully built and installed $1
    }
    
    rm -rf $BUILD_ROOT
    mkdir -p $BUILD_ROOT
    build_module apiextractor git://gitorious.org/pyside/apiextractor.git
    build_module generatorrunner git://gitorious.org/pyside/generatorrunner.git
    build_module shiboken git://gitorious.org/pyside/shiboken.git
    build_module pyside-shiboken git://gitorious.org/pyside/pyside-shiboken.git
    

    Run it and wait a while (Qt is quite big). 🙂

    This script will download all packages into /tmp/pyside-build, build each one in its own “build” directory and install everything into /tmp/sandbox. Then, I just had to set PYTHONPATH to /tmp/sandbox/lib/python2.6/site-packages and PySide worked fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.