Search code examples
pythonpygtkmacports

Is it normal for pygtk library download with macports to take a long time and print 33000 lines to terminal?


I am new to python and programming in general.

I want to download the python gtk library in order to do some interacing with my arduino. My question is, is it normal for this installation to take so long? Also, did I do it right? And if I screwed up, how can I uninstall this and fix the issue.

As instructed by my textbook, "Make: Arduino Bots and Gadgets," I downloaded macports (which works fine. I have tested it with man ports). But then I tried to use the command the book provides to download the gtk library: sudo port install py-gtk2. This code did not work. I did some research (sorry, I lost the link where I found the code), which told me to input sudo port install py27-pygtk. I pasted that into my terminal about an hour ago, and now there are about 33,000 lines of code being printed in my terminal. I've included the beginning and end of this printout below. The terminal has been stalled at the line `building libgcc for about 20 minutes.

BTW, I am running python version 2.7.9

$ sudo port install py27-pygtk
Password:
--->  Computing dependencies for py27-pygtk
--->  Dependencies to be installed: atk gettext expat libiconv ncurses glib2 libffi perl5 perl5.16 gdbm zlib gobject-introspection cairo fontconfig freetype bzip2 libpng libpixman xorg-libXext xorg-libX11 xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb python27 db48 db_select libedit openssl python_select sqlite3 xorg-libpthread-stubs xorg-xcb-proto libxml2 xz xorg-xextproto xorg-xcb-util xrender xorg-renderproto libtool py27-mako py27-beaker py27-setuptools py27-markupsafe gtk2 gdk-pixbuf2 jasper jpeg shared-mime-info tiff hicolor-icon-theme pango Xft2 harfbuzz graphite2 xorg-libXcomposite xorg-compositeproto xorg-libXfixes xorg-fixesproto xorg-libXcursor xorg-libXdamage xorg-damageproto xorg-libXi xorg-inputproto xorg-libXinerama xorg-xineramaproto xorg-libXrandr xorg-randrproto libglade2 py27-cairo py27-gobject py27-numpy fftw-3 libgcc cctools llvm-3.5 libcxx llvm_select cloog gmp isl gcc_select ld64 libmpc mpfr py27-cython cython_select py27-nose nosetests_select
--->  Fetching archive for expat
--->  Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2 from http://packages.macports.org/expat
--->  Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2.rmd160 from http://packages.macports.org/expat
--->  Installing expat @2.1.0_0
--->  Activating expat @2.1.0_0
--->  Cleaning expat
--->  Fetching archive for libiconv
--->  Attempting to fetch libiconv-1.14_0.darwin_13.x86_64.tbz2 from http://packages.macports.org/libiconv
--->  Attempting to fetch libiconv-1.14_0.darwin_13.x86_64.tbz2.rmd160 from http://packages.macports.org/libiconv
--->  Installing libiconv @1.14_0
--->  Activating libiconv @1.14_0
--->  Cleaning libiconv
--->  Fetching archive for ncurses
--->  Attempting to fetch ncurses-5.9_2.darwin_13.x86_64.tbz2 from 

...

--->  Fetching archive for libmpc
--->  Attempting to fetch libmpc-1.0.2_1.darwin_13.x86_64.tbz2 from http://packages.macports.org/libmpc
--->  Attempting to fetch libmpc-1.0.2_1.darwin_13.x86_64.tbz2.rmd160 from http://packages.macports.org/libmpc
--->  Installing libmpc @1.0.2_1
--->  Activating libmpc @1.0.2_1
--->  Cleaning libmpc
--->  Fetching archive for libgcc
--->  Attempting to fetch libgcc-4.9.2_1.darwin_13.x86_64.tbz2 from http://packages.macports.org/libgcc
--->  Attempting to fetch libgcc-4.9.2_1.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/libgcc
--->  Attempting to fetch libgcc-4.9.2_1.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libgcc
--->  Fetching distfiles for libgcc
--->  Attempting to fetch gcc-4.9.2.tar.bz2 from http://mirror.facebook.net/gnu/gcc/gcc-4.9.2
--->  Verifying checksums for libgcc                                            
--->  Extracting libgcc
--->  Applying patches to libgcc
--->  Configuring libgcc
--->  Building libgcc

Solution

  • Yes, this is normal if you don't have anything else installed via MacPorts. port doesn't just install the package you specify, it also installs all the dependencies, and their dependencies, etc. etc. Since it builds a number of packages from scratch, GCC is required. Let it go for a while, as building everything takes a good amount of time, depending on the specs of your computer. If it seems to be stuck on a particular step for an hour or so, though, probably something has gone wrong. Hit CtrlC, then run your previous command again. As you can see from the "Dependencies" line, a rather large list of packages (90 of them) need to be downloaded, built, and installed (I sorted them alphabetically):

    atk bzip2 cairo cctools cloog cython_select db48 db_select expat fftw-3 fontconfig freetype gcc_select gdbm gdk-pixbuf2 gettext glib2 gmp gobject-introspection graphite2 gtk2 harfbuzz hicolor-icon-theme isl jasper jpeg ld64 libcxx libedit libffi libgcc libglade2 libiconv libmpc libpixman libpng libtool libxml2 llvm-3.5 llvm_select mpfr ncurses nosetests_select openssl pango perl5 perl5.16 py27-beaker py27-cairo py27-cython py27-gobject py27-mako py27-markupsafe py27-nose py27-numpy py27-setuptools python27 python_select shared-mime-info sqlite3 tiff Xft2 xorg-compositeproto xorg-damageproto xorg-fixesproto xorg-inputproto xorg-kbproto xorg-libpthread-stubs xorg-libX11 xorg-libXau xorg-libxcb xorg-libXcomposite xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes xorg-libXi xorg-libXinerama xorg-libXrandr xorg-randrproto xorg-renderproto xorg-xcb-proto xorg-xcb-util xorg-xextproto xorg-xineramaproto xorg-xproto xrender xz zlib