Mavericks (10.9.3) Python shelve error: ImportError: No module named _bsddb

Hi when I updated my OS X to Mavericks (10.9.3), my python couldn't recognize bsddb anymore, which worked fine for my previous versions. This is very annoying since it wasted a whole day of mine without a solution.
I urge Apple support to give me an answer as QUICK as possible.
I have tried a lot of possible fixes on StackOverflow, and I have bsddb installed on my computer, and bsddb3 package. Also I followed this tutorial to fix the import issues (which worked before I updated my OS).
http://marc-abramowitz.com/archives/2007/11/28/hacking-os-xs-python-dbhash-and-b sddb-modules-to-work/
Please let me know a solution, this is urgent and I can't waste time on this anymore.

carebearboy wrote:
I get this error when attempting to import pygame:
Python 3.2.1 (default, Jul 11 2011, 12:37:47)
[GCC 4.6.1] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
Traceback (most recent call last):
File "/home/user/Documents/fun.py", line 3, in <module>
import pygame, sys, random
ImportError: No module named pygame
>>>
I've tried installing:
python3-pygame
python3-pygame2
python-pygame
and a couple others...
Either I get the same error or the install yaourt aborts due to a bad compile. I noticed that I have python 2.7 also installed on my computer.
Have you tried python3-pygame-svn?
I'm not a pygame user myself, but it built okay for me, and I was able to import it in python3 with no errors.
EDIT: just noticed that the pkgbuild is missing a dependency: python-numpy.
Last edited by kachelaqa (2011-08-28 19:42:06)

Similar Messages

  • Python setuptools gives 'ImportError: No module named version' error

    I am trying to install hdctools-git from AUR and it fails in install() with following error. This package was fine last time I installed it about 2 months ago. My gut feeling says the error comes either from recent python2-setuptools or python2 package update. But my python skills are not good enough to figure out how to solve the problem.
    Does anybody know what is going here?
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbgpio_unittests.py to bbgpio_unittests.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/gpio_interface.py to gpio_interface.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/uart.py to uart.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/client.py to client.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbuart_unittests.py to bbuart_unittests.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbadc.py to bbadc.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbmux_controller.py to bbmux_controller.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/system_config.py to system_config.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbgpio.py to bbgpio.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/ftdigpio.py to ftdigpio.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbi2c_unittests.py to bbi2c_unittests.pyc
    writing byte-compilation script '/tmp/tmp4TA67u.py'
    /usr/bin/python2 -O /tmp/tmp4TA67u.py
    removing /tmp/tmp4TA67u.py
    running install_egg_info
    running egg_info
    writing build/servo.egg-info/PKG-INFO
    writing top-level names to build/servo.egg-info/top_level.txt
    writing dependency_links to build/servo.egg-info/dependency_links.txt
    writing entry points to build/servo.egg-info/entry_points.txt
    Traceback (most recent call last):
      File "setup.py", line 28, in <module>
        'dut-control = servo.dut_control:main',
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python2.7/distutils/command/install.py", line 575, in run
        self.run_command(cmd_name)
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.py", line 33, in run
        self.run_command('egg_info')
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 171, in run
        writer = ep.load(installer=installer)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2310, in load
        return self.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
    ImportError: No module named version
    ==> ERROR: A failure occurred in package().
        Aborting...
    Last edited by anatolik (2015-01-18 06:39:16)

    I am getting the same problem. Uninstalling python2-daemon fixed it for me, as suggested here: http://stackoverflow.com/a/27996309/646735
    I have also logged an upstream issue here: https://bitbucket.org/pypa/setuptools/i … ed-version

  • Python doesn't run and I got this error: "ImportError: No module named site".

    After installing lion python still was working but a new version was added and I don't know exactly what happend that no python scripts were able to run on my macbook. It might be because of path setting but I check many options such as setting PYTHONPATH enviroment variable, however it help a bit and now python is started but still couldn't run the spripts I was running them before.
    This issure blocks all my development tasks.

    The out of the commad find /System/Library/Frameworks/Python.framework -type f -name site.py* -ls:
    8256584       32 -rw-r--r--    1 root             wheel               12354 Jun 14 07:21 /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site.py
    6020145       16 -rw-r--r--    1 root             wheel               12151 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site.pyc
    6020146       16 -rw-r--r--    1 root             wheel               12151 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site.pyo
    6021735        0 -rw-r--r--    1 root             wheel                3585 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2a pp/apptemplate/lib/site.py
    6021736        0 -rw-r--r--    1 root             wheel                3325 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2a pp/apptemplate/lib/site.pyc
    6021776        0 -rw-r--r--    1 root             wheel                3042 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2a pp/bundletemplate/lib/site.py
    6021777        0 -rw-r--r--    1 root             wheel                3062 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2a pp/bundletemplate/lib/site.pyc
    6021911        0 -rw-r--r--    1 root             wheel                2362 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/site .py
    6021912        0 -rw-r--r--    1 root             wheel                1855 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/site .pyc
    6021913        0 -rw-r--r--    1 root             wheel                1983 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/site .pyo
    8252446       32 -rw-r--r--    1 root             wheel               14620 Jun 17 10:01 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.py
    6011169       16 -rw-r--r--    1 root             wheel               16285 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.pyc
    6011170       16 -rw-r--r--    1 root             wheel               16285 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.pyo
    6022794        0 -rw-r--r--    1 root             wheel                3645 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/py2a pp/apptemplate/lib/site.py
    6022795        0 -rw-r--r--    1 root             wheel                3385 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/py2a pp/apptemplate/lib/site.pyc
    6022836        0 -rw-r--r--    1 root             wheel                3043 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/py2a pp/bundletemplate/lib/site.py
    6022837        0 -rw-r--r--    1 root             wheel                3056 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/py2a pp/bundletemplate/lib/site.pyc
    6022987        0 -rw-r--r--    1 root             wheel                2362 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/site .py
    6022988        0 -rw-r--r--    1 root             wheel                1855 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/site .pyc
    6022989        0 -rw-r--r--    1 root             wheel                1983 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/site .pyo
    8253860       40 -rw-r--r--    1 root             wheel               19163 Jun 17 10:03 /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.py
    6014231       24 -rw-r--r--    1 root             wheel               20581 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc
    6014232       24 -rw-r--r--    1 root             wheel               20581 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyo
    6023870        0 -rw-r--r--    1 root             wheel                3645 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2a pp/apptemplate/lib/site.py
    6023871        0 -rw-r--r--    1 root             wheel                3334 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2a pp/apptemplate/lib/site.pyc
    6023912        0 -rw-r--r--    1 root             wheel                3043 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2a pp/bundletemplate/lib/site.py
    6023913        0 -rw-r--r--    1 root             wheel                3009 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2a pp/bundletemplate/lib/site.pyc
    6024063        0 -rw-r--r--    1 root             wheel                2362 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/site .py
    6024064        0 -rw-r--r--    1 root             wheel                1809 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/site .pyc
    6024065        0 -rw-r--r--    1 root             wheel                1937 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/site .pyo
    8255408       40 -rw-r--r--    1 root             wheel               19929 Jun 17 10:03 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py
    6017466       24 -rw-r--r--    1 root             wheel               21430 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc
    6017467       24 -rw-r--r--    1 root             wheel               21430 Jul 21 14:06 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyo
    Last night my colleague and I spent a while working on the issue, apparantly a sofware has set PYTHONPATH env variable and it causes the problem. How can I get rid of the variable permanently?
    Thanks.

  • WLST : ImportError: no module named javaos

    Hi,
    I try to run wlst on a platform linux but at the time I launch wlst I obtain the following error: ImportError: no module named javaos
    my classpath contains wlst.jar,jython.jar, and weblogic.jar, tools.jar, rt.jar, etc.
    pythonpath, pythonhome are set to wlst install directory, and modules, scripts "py".
    thanks in advance.
    here the detail of the exception.
    /pdt/pdslpd1/p/8.1/jdk142_05/bin/java -Dwlst.debug.init=true -Duser.home=/pdt/pdc1pd0/p/mdw/bin/weblogic/ -Dpython.home=/pdt/pdslpd1/p/8.1/wlst/ -Dpython.path=/pdt/pdslpd1/p/8.1/wlst/ weblogic.WLST webloadmin.py
    Initializing WebLogic Scripting Tool (WLST) ...
    Setting the python home to /pdt/pdslpd1/p/8.1/wlst/
    Error executing wlstProfile.py
    Traceback (innermost last):
    File "/pdt/pdc1pd0/p/mdw/bin/weblogic/./wlstProfile.py", line 5, in ?
    ImportError: no module named javaos
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    Traceback (innermost last):
    File "webloadmin.py", line 1, in ?
    ImportError: no module named re

    Hi,
    Another subject, Could you explain us how to use specific encoding (for example latin-1) to print european characters in stdout.
    I try to declare sys.setDefaultencoding('latin-1') in wlstProfile.py but it doesn't work fine.
    Thanks.

  • ALSB ImportError: No module named customization

    Hi,
    I am getting this error
    ImportError: No module named customization
    Looks like it is not finding the package in the classpath.
    from com.bea.wli.config.customization import Customization
    bash-3.00$ echo $CLASSPATH
    /opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/java/lib/fscontext.jar:/opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/providerutil.jar::/usr/local/esb/bea/wlserver_10.0/server/lib/wlpatches/CR382420_1000mp1.jar:/usr/local/esb/bea/user_projects/domains/esbdomain/app_patches/*.jar::/usr/local/esb/bea/patch_wss110/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_wlw1020/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_wls1001/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_cie640/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_alsb300/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/jdk150_11/lib/tools.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/weblogic_sp.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/weblogic.jar:/usr/local/esb/bea/modules/features/weblogic.server.modules_10.0.1.0.jar:/usr/local/esb/bea/modules/features/com.bea.cie.common-plugin.launch_2.1.2.0.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/webservices.jar:/usr/local/esb/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/usr/local/esb/bea/modules/net.sf.antcontrib_1.0b2.0/lib/ant-contrib.jar::/usr/local/esb/bea/wlserver_10.0/../modules/features/alsb.server.modules_3.0.0.0.jar:/usr/local/esb/bea/alsb_3.0/lib/flow/sb-flow.jar:/usr/local/esb/bea/wlserver_10.0/../modules/com.bea.core.jaxen_1.0.0.0_1-1-1.jar:/usr/local/esb/bea/wlserver_10.0/platform/lib/p13n/p13n_system.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/wlxbean.jar:/usr/local/esb/bea/alsb_3.0/lib/version.jar:/usr/local/esb/bea/alsb_3.0/lib/alsb.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-ant.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-common.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-core.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-dameon.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/classes:/usr/local/esb/bea/wlserver_10.0/../modules/com.bea.core.apache.commons.logging_1.1.0.jar::/usr/local/esb/bea/wlserver_10.0/common/eval/pointbase/lib/pbembedded51.jar:/usr/local/esb/bea/wlserver_10.0/common/eval/pointbase/lib/pbupgrade51.jar:/usr/local/esb/bea/wlserver_10.0/common/eval/pointbase/lib/pbclient51.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/xqrl.jar:
    I see alsb.jar is in the classpath and unable to figure out why WLST is complaining about customization package.
    Does anyone know which alsb jar file contains this com.bea.wli.config.customization package ?
    Thanks --agr                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    I am running into customization problem.
    For somereason, ALSBConfigurationMBean.customize() method expects two arguments while ALSB API needs only one argument http://edocs.bea.com/alsb/docs30/javadoc/com/bea/wli/sb/management/configuration/ALSBConfigurationMBean.html#customize(java.util.List).
    As you see in the script I am passing one List argument as expected by API above.
    Has anyone encountered this error. Anything wron on my script ?
    Here is the code I am using in my jython script.
    if custfile != None :
    print "************************************************************************************************************"
    print 'Loading customization file...', custfile
    print "************************************************************************************************************"
    input = FileInputStream(custfile)
    custlist = Customization.fromXML(input)
    filteredCustList = ArrayList()
    setRef = HashSet(createdRef)
    # apply a filter to all the customizations to narrow the target to the created resources
    for customization in custlist:
    print customization
    newcustomization = customization.clone(setRef)
    filteredCustList.add(newcustomization)
    print filteredCustList
    ALSBConfigurationMBean.customize(filteredCustList)
    sessionMBean.activateSession(sessionName, "import file completed");
    print
    print '-- DEPLOYMENT COMPLETE --'
    com.bea.wli.config.customization.EnvValueCustomization@1f9690e
    [email protected]d08
    com.bea.wli.config.customization.ReferenceCustomization@14c491b
    [com.bea.wli.config.customization.EnvValueCustomization@19726d9, [email protected]c2, com.bea.wli.config.customization.ReferenceCustomization@1a68065]
    Unexpected error: exceptions.TypeError
    No stack trace available.
    Problem invoking WLST - Traceback (innermost last):
    File "/usr/local/esb/sse/DeployALSBResources.py", line 198, in ?
    TypeError: customize(): expected 2 args; got 1
    Thanks --agr                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ImportError: No module named cie

    Hi,
    In our test framework we have imported weblogic.management.scripting.utils.WLSTInterpreter.
    This was running fine untill now where we see the error : ImportError: No module named cie
    Is there something that we are missing?
    Thanks in advance,
    Nandini

    Hi,
    In our test framework we have imported weblogic.management.scripting.utils.WLSTInterpreter.
    This was running fine untill now where we see the error : ImportError: No module named cie
    Is there something that we are missing?
    Thanks in advance,
    Nandini

  • [Solved] Recent updates cause Gramps error: No module named _bsddb

    Did a 'pacman -Syu' today and Gramps fails to start:
    $ gramps
    2599: ERROR: gramps.py: line 142: Unhandled exception
    Traceback (most recent call last):
    File "/usr/share/gramps/gui/grampsgui.py", line 271, in __startgramps
    from GrampsLogger import RotateHandler, GtkHandler
    File "/usr/share/gramps/GrampsLogger/__init__.py", line 45, in <module>
    from _GtkHandler import GtkHandler
    File "/usr/share/gramps/GrampsLogger/_GtkHandler.py", line 4, in <module>
    from _ErrorView import ErrorView
    File "/usr/share/gramps/GrampsLogger/_ErrorView.py", line 15, in <module>
    from _ErrorReportAssistant import ErrorReportAssistant
    File "/usr/share/gramps/GrampsLogger/_ErrorReportAssistant.py", line 14, in <module>
    import bsddb
    File "/usr/lib/python2.7/bsddb/__init__.py", line 67, in <module>
    import _bsddb
    ImportError: No module named _bsddb
    Was working fine a few days ago ...
    Last edited by ninian (2011-07-07 20:20:32)

    Please put it in the bug report, as installing python2-bsddb didn't seem to fix the issue...
    Report for python2: https://bugs.archlinux.org/task/25045 [CLOSED]
    EDIT:
    In fact, the problem comes from gramps, which should import bsddb3, see GRAMPS wiki.
    Report for gramps (the config should be changed to use bsddb3 by default): https://bugs.archlinux.org/task/25050
    Last edited by Fififox (2011-07-07 08:54:32)

  • [SOLVED] pygtk error - ImportError : No module name 'pygtk'

    Hi,
    pygtk has not been working (and never has), and I've looked at and tried solutions in other threads, but none have fixed my problem.
    This is what I did:
    $ python
    Python 3.3.2 (default, Sep 6 2013, 09:35:59)
    [GCC 4.8.1 20130725 (prerelease)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pygtk
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named 'pygtk'
    >>>
    I've tried uninstalling pygtk, pygobject, and pycairo, and then reinstalling pygobject, pycairo, then pygtk, as suggested in other threads.
    Thank you for any help,
    dluco
    Last edited by dluco (2013-09-27 03:58:37)

    dluco wrote:
    Got it. Running
    $ python2
    >>>import pygtk
    works just fine.
    The reason I was trying to get pygtk to work is because I have a script that needs pygtk. The script starts with
    #!/usr/bin/env python
    Would changing the header to "python2" work?
    Thanks
    Almost certainly.  If you want to try it first, launch the script by placing python2 in from of the name, in other words:
    ewaller$@$odin ~/devel/python 1008 %./hello uptime
    File "./hello", line 11
    print "Content-type: text/html"
    ^
    SyntaxError: invalid syntax
    ewaller$@$odin ~/devel/python [1]1009 %python2 hello uptime
    Content-type: text/html
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html>
    <head>
    <title> It's my party</title>
    </head>
    <body>
    <h3>The passed parameters are:</h3>
    <br>hello
    <br>uptime
    <p><h2>Here is the output from the linux command uptime</h2><p>
    <pre>
    15:36:00 up 2 days, 18:08, 2 users, load average: 0.12, 0.20, 0.22 </pre>
    </body>
    </html>
    ewaller$@$odin ~/devel/python 1010 %
    BTW, do not ever leave a script like this laying around on a Django server

  • ImportError: No module named gtkhtml2

    I installed BlogTK (from the TUR repo) and can't get the program to run. When I run the program in terminal I get the following:
    $ BloGTK --help
    Traceback (most recent call last):
    File "/opt/gnome/bin/BloGTK", line 15, in ?
    import gtkhtml2
    ImportError: No module named gtkhtml2
    Any ideas on how to fix this? I'm not fimilar with Python and googling this error came up pretty weak and not very useful. Thanks in advance for any help.
    Jay

    it seems that the package may be missing a depend or may have been build on a system that had gtkhtml installed on it and that was autodetected when the TU built the package.
    contact the TU

  • ImportError: No module named qt [SOLVED]

    I'm having a problem whereby qt cannot be found and all applications that use it fail to load.
    I have installed qt, qt3 and qt4 so, missing packages cannot be the issue.
    Issuing echo $QTDIR returns /opt/qt so the path is found, yet when I run any applications that depend on QT  I get: ImportError: No module named qt
    I noticed other threads with a similar problem but non of them have an answer that applies to me. Does anyone have any ideas? 
    I thought that posting here may be a better choice, since in a programming forum there should be people using python and if this is a known problem an answer will surely be at hand
    Thanks in advance.
    R.
    Last edited by ralvez (2008-03-15 17:14:32)

    @Shaika-Dzari,
    Thanks for your reply. Yes, I know that the "official" QT package is 4.
    I have two programs, one that I wrote and Kodos (a nice tool for RegEx testing/coding). Both started to fail with the same error a few weeks ago.
    Querying my system for info indicated that I have both QT3 and QT4 but in actual execution mode QT4 was not detected.
    I just did something a few minutes ago that got things back to work !! 
    pacman -Sy pyqt pyqt3
    After re-installing both of the packages things are back to normal ... interestingly enough, re-installing PyQT only, which given the error would seem the logical thing to do, did not solve the problem (??) I had to re-install both.
    Thanks again for posting.
    R.

  • [s] gnome-sh...sion-tool ImportError: No module named 'gi.repository

    After upgrading Gnome from 3.14 to 3.16 I had to reinstall my extensions, namely hide top bar. However when I went to run " gnome-shell-extension-tool -e hidetopbar-master" I get the following error:
    Traceback (most recent call last):
    File "/usr/bin/gnome-shell-extension-tool", line 20, in <module>
    from gi.repository import Gio
    ImportError: No module named 'gi.repository'
    I tried something simpler for the program to run, "--help", and the result was the same
    $ gnome-shell-extension-tool --help
    Traceback (most recent call last):
    File "/usr/bin/gnome-shell-extension-tool", line 20, in <module>
    from gi.repository import Gio
    ImportError: No module named 'gi.repository'
    Turns out that /usr/bin/gnome-shell-extension-tool is a python scrypt (so I can read the thing), and so I'm guessing the file gi.repository is simply missing so it can't use "Gio". I ran "# pacman -Qkq" to check to make sure that everything was inorder, and it is. I ran "pacman -Qo" to see which package owns gnome-shell-extension-tool (its gnome-shell as one might have guessed) and tried re-installing that. No luck. Next I tried running a search for gi.repository in hopes that it's somewhere the script can't find. Unfortunately, that didn't help either.
    I then looked at gnome-shell-extensions from a snapshot made before the upgrade and it too contains the line "from gi.repository import Gio", and I know I successfully installed this extension before in this manner since I've never been able to get Chromium or Firefox to install extensions for me. More over, the snapshot was searched as well.
    Any ideas?
    [edit=solution]
    hokasch wrote:
    $ pacman -Qo /usr/lib/python3.4/site-packages/gi/repository/
    /usr/lib/python3.4/site-packages/gi/repository/ is owned by python-gobject 3.16.0-1
    are you missing python-gobject?
    Last edited by nstgc (2015-04-12 17:12:26)

    hokasch wrote:
    $ pacman -Qo /usr/lib/python3.4/site-packages/gi/repository/
    /usr/lib/python3.4/site-packages/gi/repository/ is owned by python-gobject 3.16.0-1
    are you missing python-gobject?
    Thanks that worked, however it's not showing in gnome-shell-extension-prefs. Still, the problem is solved. Thank you.

  • ImportError: No module named com.bea.wli.sb.management.configuration

    Hi all,
    when i run the python script in python shell i am getting this error:
    Traceback (most recent call last):
    File "D:\osb_disable_service.py", line 2, in <module>
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    ImportError: No module named com.bea.wli.sb.management.configuration
    i have set the CLASSPATH to D:\bea\wlserver_10.3\server\lib\weblogic.jar
    i have set $CLASSPATH to D:\bea\osb_10.3\lib\sb-kernel-api.jar

    version: Oracle Service Bus 10gR3..
    the python script:
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
    from com.bea.wli.config import Ref
    from java.lang import String
    from com.bea.wli.monitoring import StatisticType
    from com.bea.wli.config import Ref
    from com.bea.wli.sb.util import Refs
    from com.bea.wli.sb.management.configuration import CommonServiceConfigurationMBean
    from java.lang import String
    from com.bea.wli.monitoring import StatisticType
    from com.bea.wli.config import Ref
    from com.bea.wli.sb.util import Refs
    from com.bea.wli.sb.management.configuration import CommonServiceConfigurationMBean
    admin_server="localhost"
    admin_server_poort="7001"
    wluser="weblogic"
    wlpassword="weblogic"
    domain="base_domain"
    project=raw_input("JMSResponseMessage" )
    service=raw_input("getResponse_proxyWsdl")
    action=raw_input("disable")
    connect(wluser, wlpassword, 't3://'+ admin_server + ':' + admin_server_poort)
    domainRuntime()
    # Create a session name
    #sessionName =
    sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
    print('… after session. Session is: ', sessionName)
    # Get the session MBean and create a session
    sessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
    print('SessionMBean is: ', sessionMBean)
    sessionMBean.createSession(sessionName)
    print(String('Session was created … ').concat(sessionName))
    # Get the ProxyServiceConfigurationMBean specific to our session
    mbean = findService(String("ProxyServiceConfiguration.").concat(sessionName),'com.bea.wli.sb.management.configuration.ProxyServiceConfigurationMBean')
    # Creates a reference to a folder.
    # and ‘ProxyServices’ is a folder in the project
    #folderRef = Refs.makeParentRef(‘project/’)
    # and ‘ProxyServices’ is a folder in the project
    projectName = Refs.makeParentRef(project + '/')
    proxyRef = Refs.makeProxyRef(projectName, service)
    # do the action
    def setService():
    if action == 'disable':
    print "Disabling " + service
    mbean.disableService(proxyRef)
    else:
    print "Enabling " + service
    mbean.enableService(proxyRef)
    # or enable it
    setService()
    # Now commit (activate) the changes
    sessionMBean.activateSession(sessionName, "disabled PS")
    print (' has been completed')
    print
    disconnect()
    exit()
    WLST command: java weblogic.WLST filename

  • ImportError: no module named java  : While running a scenario (ODI 10.1.3.)

    Hi All,
    When i am running a scenario i am getting the below error in the 'error log ' file....Please let me know any pointers on the same.. its urgent:-
    =========================================================
    [oraodi@apo13100098 error]$ cat SIL_TIMEDIMENSION_CALCONFIG.30402.log
    12/15/11 10:26 AM :
    Session No-> 30402
    Package Name-> SIL_TIMEDIMENSION_CALCONFIG
    Step Name-> SIL_TimeDimension_CalConfig.MCAL_CONFIG_G
    Error Details->
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 2, in ?
    ImportError: no module named java
    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.e.y(e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)
    ===========================================================================================
    Cheers
    Manoj

    Hi Venkat,
    The error got resolved after adding '/usr/kerberos/bin:/usr/local/bin' to my PATH variable.
    cheers
    Manoj

  • [SOLVED] ImportError: No module named pygtk

    I have installed Dropbox from the AUR. Everything has gone well until I tried to start dropbox. It then says:
    Starting Dropbox...
    The Dropbox daemon is not installed!
    Run "dropbox start -i" to install the daemon"
    When I run "dropbox start -i", I get: (I actually run "dropbox-cli start -i," but before I installed dropbox-cli I was having the same problems with the dropbox command:)
    Starting Dropbox...Traceback (most recent call last):
    File "/usr/bin/dropbox-cli", line 1259, in start
         download()
    File "/usr/bin/dropbox-cli", line 280, in download
         import pygtk
    ImportError: No module named pygtk
    From what I've read, this is due to the program expecting python or python2, but  since I have python3 installed, then python links to python3. And pygtk doesn't exist in python3.
    This might or might not be the problem. Regardless, I cannot figure out how to fix this problem.
    Anyone know how to fix this? I really need to use DropBox.
    EDIT: I found an article describing what to install and in what order to fix this.
    Last edited by cobbmic (2015-02-17 19:05:32)

    Hello. Glad you fixed it.
    Please give us at least a link to the "article". For others who are interested in this.
    I quickly search beforehand but couldn't find a solution right away.
    Thanks!
    Edit: wording
    Last edited by rebootl (2015-02-17 22:07:31)

  • ImportError: no module named java

    One of our customers is using Windows XP SP 3 and they are running into below error when packages are run.
    It is happening at a specific step in IKM where Jython techonology is used. But this kind of issue never occured in dev/qa environments.
    Any hint is greatly appreciated.
    One more thing is customer is on 10.1.3.4, while delivered code was on 10.1.3.4.4 . Could that cause any issues?
    ==================================================================
    org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
    File "<string>", line 1, in ?
    ImportError: no module named java
    at org.apache.bsf.engines.jython.JythonEngine.exec(Unknown Source)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.g.y(g.java)
    at com.sunopsis.dwg.cmd.e.run(e.java)
    at java.lang.Thread.run(Thread.java:619)
    ==================================================================

    Hi,
    has anyone idea how to resolve this problem? I've error when I try to start Journal:
    org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
      File "<string>", line 1, in ?
    ImportError: no module named java
      at org.apache.bsf.engines.jython.JythonEngine.exec(Unknown Source)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
      at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
      at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
      at com.sunopsis.dwg.cmd.e.i(e.java)
      at com.sunopsis.dwg.cmd.g.y(g.java)
      at com.sunopsis.dwg.cmd.e.run(e.java)
      at java.lang.Thread.run(Unknown Source)
    Any idea what should I do ? JKM which I use is: JKM HSQL.
    Thanks for help.
    ===========================================
    EDIT:
    Solution for my problem was running Designer as Administrator. (Win 7).

Maybe you are looking for