Search Results

Search found 282 results on 12 pages for 'importerror'.

Page 7/12 | < Previous Page | 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Can't import obj in Python on OS X 10.6.3 Snow Leopard - libiconv.2.dylib?

    - by James
    on OS X 10.6.3 Snow Leopard % python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. import objc Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.6-universal.egg/objc/__init__.py", line 22, in _update() File "/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.6-universal.egg/objc/__init__.py", line 19, in _update import _objc ImportError: dlopen(/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.6-universal.egg/objc/_objc.so, 2): Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.6-universal.egg/objc/_objc.so Reason: Incompatible library version: _objc.so requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0 -- what do I need to do?

    Read the article

  • What are the differences among sqlite3 from python2.5, pysqlite and apsw

    - by leo
    Hi, I would like to know the differences among sqlite3 from python2.5, pysqlite and apsw? I have a bumpy run when trying to install pysqlite on windows vista with python2.5, see following: download sqlite from http://sqlite.org/download.html and unzip them into windows/system32 folder and put sqlite3.dll into c:/python25/Lib folder download pysqlite windows installer when trying to run following in python shell: >>> from pysqlite2 import test Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pysqlite2\test\__init__.py", line 35, in <module> from pysqlite2.test import dbapi, types, userfunctions, factory, transactions,\ File "pysqlite2\test\dbapi.py", line 27, in <module> import pysqlite2.dbapi2 as sqlite File "pysqlite2\dbapi2.py", line 27, in <module> from pysqlite2._sqlite import * ImportError: No module named _sqlite I am wondering anybody with experiences of the above three types of sqlite binding to python can comment their pros and cons such as performances I am wondering is it worthwhile to try the pysqlite or apsw thanks

    Read the article

  • Installing Mapnik 2.2.0 in windows 7 with Python 2.7

    - by Joan Natalie
    I've been trying to install mapnik on my computer for hours but what i always get when I import mapnik is ImportError: DLL load failed: The specified procedure could not be found. I'm using Windows 7. The currently installed software is Geoserver from Opengeo suite. Here is my path %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\Java\jre7\bin;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Python27;C:\mapnik-v2.2.0\lib My python path: C:\Python27;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Program Files\ArcGIS\bin;C:\\mapnik-v2.2.0\python\2.7\site-packages\;C:\mapnik-v2.2.0\bin\;

    Read the article

  • Module import error using IDLE

    - by Nimbuz
    I'm an absolute beginner using IDLE (Python 2.6.4) to learn the basics. I recently found a Python program that I want to run but it throws an error although the code looks fine (i.e all modules exist): from css.parse import parse data = """ em { padding: 2px; margin: 1em; border-width: medium; border-style: dashed; line-height: 2.4em; } p { color: red; font-size: 12pt } p:first-letter { color: green; font-size: 200% } p:first-line { color: blue }""" for rule in parse(data): print rule for decl in parse(data)[0]: print decl Error: ImportError: No module named parse How do I fix this? I'm using Snow Leopard. Edit: I guess its a PATH issue, where should I place the modules, which directory?

    Read the article

  • Jython project in Eclipse can't find the Jython library, but works in an identical project

    - by Rob Lourens
    I have two projects in Eclipse with Java and Python code, using Jython. Also I'm using PyDev. One project can import and use the xml module just fine, and the other gives the error ImportError: No module named xml. As far as I can tell, all the project properties are set identically. The working project was created from scratch and the other comes from code checked out of an svn repository and put into a new project. What could be the difference?

    Read the article

  • My python auto-login script is broken.

    - by user310392
    A long time ago, I wrote a little python script to automatically log me on to the wireless network at my office. Here is the code: #!/opt/local/bin/python from urllib2 import urlopen from ClientForm import ParseResponse try: if "Logged on as" in urlopen("https://MYWIRELESS.com/logon").read(): print "Already logged on." else: forms = ParseResponse(urlopen("https://MYWIRELESS.com/logon"), backwards_compat=False) form = forms[0] form["username"], form["password"] = "ME", "MYPASSWD" urlopen(form.click()) print "Logged on. (probably :-)"; except IOError, e: print "Couldn't connect to wireless login page:\n", e I changed computers recently, and it stopped working. Now, I get the error: File "login.txt", line 4, in <module> from ClientForm import ParseResponse ImportError: No module named ClientForm which makes it look like I don't have some package (ClientForm) installed, so I installed it (sudo port install py-clientform), but I still get the same error. Does anyone have an idea what I'm doing wrong?

    Read the article

  • How to play sound in Python WITHOUT interrupting music/other sounds from playing

    - by Morlock
    I'm working on a timer in python which sounds a chime when the waiting time is over. I use the following code: from wave import open as wave_open from ossaudiodev import open as oss_open def _play_chime(): """ Play a sound file once. """ sound_file = wave_open('chime.wav','rb') (nc,sw,fr,nf,comptype, compname) = sound_file.getparams( ) dsp = oss_open('/dev/dsp','w') try: from ossaudiodev import AFMT_S16_NE except ImportError: if byteorder == "little": AFMT_S16_NE = ossaudiodev.AFMT_S16_LE else: AFMT_S16_NE = ossaudiodev.AFMT_S16_BE dsp.setparameters(AFMT_S16_NE, nc, fr) data = sound_file.readframes(nf) sound_file.close() dsp.write(data) dsp.close() It works pretty good, unless any other device is already outputing sound. How could I do basically the same (under linux) without having the prerequisite that no sound is being played? If you think the process would require an API to ensure software mixing, please suggest a method :) Thx for the support

    Read the article

  • django urls.py regex isn't working

    - by Phil
    This is for Django 1.2.5 and Python 2.7 on Wamp Server running apache version 2.2.17. My problem is that the my URLConf in urls.py isn't redirecting, it's just throwing a 404 error. urls.py: from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', (r'^app/$', include('app.views.index')), # Uncomment the admin/doc line below to enable admin documentation: #(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: #(r'^admin/', include(admin.site.urls)), ) views.py from django.http import HttpResponse def index(request): return HttpResponse("Hello World") I'm getting the following error: ImportError at /app/ No module named index I'm stumped as I'm only learning Django, can anybody see something wrong with my code? Here's my PythonPath: ['C:\Windows\system32\python27.zip', 'C:\Python27\Lib', 'C:\Python27\DLLs', 'C:\Python27\Lib\lib-tk', 'C:\wamp\bin\apache\Apache2.2.17', 'C:\wamp\bin\apache\apache2.2.17\bin', 'C:\Python27', 'C:\Python27\lib\site-packages', 'c:\wamp\www\seetwo']

    Read the article

  • Pylons importing Psycopg2 error

    - by resopollution
    Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 60, in <module> from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: dlopen(/Library/Python/2.6/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID Referenced from: /Library/Python/2.6/site-packages/psycopg2/_psycopg.so Expected in: flat namespace in /Library/Python/2.6/site-packages/psycopg2/_psycopg.so Psycopg2 was working fine before, but now I get this error. Any ideas on this issue much appreciated. EDIT: so after dealing with so many psycopg2 errors everytime I set up my mac, I've decided to use VMWareFusion running Ubuntu instead.

    Read the article

  • Compile 32bit mercurial on x86_64

    - by krashalot
    I'm using the academic version of EPD (Enthought Python Distribution) which is 32bit. My computer is Linux x86_64. platform.architecture() returns ('32bit','ELF') I want to install Mercurial. The instructions in README didn't work at first, because make gave this error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." I commented out that line in pyport.h and then it compiled fine. Now, after successful compilation I get this error when running it: ImportError: /scratch/epd/lib/python2.6/site-packages/mercurial/osutil.so: wrong ELF class: ELFCLASS64 It appears that I compiled a 64bit version of hg, and it won't run with my 32bit python. I don't see any arch flags in the mercurial makefile. How can I force it to compile in 32bit mode?

    Read the article

  • Matplotlib and WSGI/mod_python not working on Apache.

    - by Luiz C.
    Everything works as supposed to on the Django development server. In Apache, the django app also works except when matplotlib is used. Here's the error I get: No module named multiarray. Exception Type: ImportError Exception Value: No module named multiarray Exception Location: /usr/share/pyshared/numpy/core/numerictypes.py in <module>, line 81 Python Executable: /usr/bin/python Python Version: 2.6.4 From the python shell, both statements work: import numpy.core.multiarray and import multiarray. Any ideas? Thanks As I'm looking over the numpy files, I found the multiarray module, which has an extension of 'so'. My guess, is that mod_python is not reading these files.

    Read the article

  • How can I deal with No module named edit.editor ?

    - by Tomas Pajonk
    I am trying to follow the WingIDE tutorial on creating scripts in the IDE. This following example scripts always throws an error: import wingapi def test_script(test_str): app = wingapi.gApplication v = "Product info is: " + str(app.GetProductInfo()) v += "\nAnd you typed: %s" % test_str wingapi.gApplication.ShowMessageDialog("Test Message", v) Traceback (most recent call last): File "C:\Wing-pi\Scripts\test.py", line 1, in import wingapi File "C:\Program Files\Development\Wing IDE 3.1\bin\wingapi.py", line 18, in import edit.editor ImportError: No module named edit.editor Process terminated with an exit code of 1 I am launching the script in the Wing IDE as suggested by someone, but I keep getting the same result.

    Read the article

  • Django and mod_python config

    - by Peter
    My Django project is placed in /www/host1/htdocs/my/project, www and my are links to other actual folders. Apache has mod_python enabled. I have a .htaccess in project folder: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE project.settings PythonDebug On PythonOption django.root /my/project PythonPath "['/www/host1/htdocs/my/project'] + sys.path" I suppose my site should be accessible from http://host1/my/project, but I see the following error: ImportError: Could not import settings 'project.settings' (Is it on sys.path? Does it have syntax errors?): No module named project.settings Can somebody give any suggestions?

    Read the article

  • installing simplejson on the google appengine

    - by user266564
    Super nub question time! I am trying to use simplejson on the google appengine. In a terminal on my machine I have simplejson installed and working. But my when I try to import it in a script running on the appengine I get an error saying no such library exists. If open the interactive console on my machine (from the link on http://localhost:8080/_ah/admin) and type "import simplejson" I get: Traceback (most recent call last): File "/home/chris/google_appengine/google/appengine/ext/admin/init.py", line 210, in post exec(compiled_code, globals()) File "", line 1, in ImportError: No module named simplejson Any thoughts?

    Read the article

  • problems importing ttk from tkinter in python 2.7

    - by Benjimin Boyce
    I'm working with an example file in a tutorial that asks me to first do two imports: from tkinter import * from tkinter import ttk I get an error. I researched a bit and found that in python 2.7.x I need to capitalize the 't'in tkinter, so I change to: from Tkinter import * from Tkinter import ttk. the first line no longer gives and error, but I still get error: ImportError: cannot import name ttk. I have researched this issue on this site and other places, and cannot seem to understand what this ttk is. I'm further confused by the fact that, when I go to the python interpreter, and I type "help()", then "modules", and then "ttk" it seems to know what it is, and gives me a lot of description, for example: "DESCRIPTION This module provides classes to allow using Tk themed widget set." -however, python won't let me import it.

    Read the article

  • WxPython Incompatible With Snow Leopard?

    - by Alex
    Hello all, Recently I upgraded to Snow Leopard, and now I can't run programs built with wxPython. The errors I get are (from Eclipse + PyDev): import wx File "/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks /Python.framework/Versions/2.6/Extras/lib/ python/wx-2.8-mac-unicode/wx/__init__.py", line 45, in <module> File "/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib /python/wx-2.8-mac-unicode/wx/_core.py", line 4, in <module> ImportError:/System/Library/Frameworks /Python.framework/Versions/2.6/Extras/lib/python /wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode) I don't really understand them and would appreciate if you could help me to do so, also, if you do know what's going on, how can I go about fixing them? Maybe this has something to do with the fact that Snow Leopard is 64-bit? Thanks!!

    Read the article

  • Link errors loading a Python extension for i386 MacOS that was compiled on a PPC

    - by deekoo
    I'm trying to compile a Python extension (written in C) on a PPC mac (running OS X 10.4, XCode 2.5), to run under Ren'Py on both PPC and i386 MacOS. The PPC version works; the i386 version fails to load with ImportError: dlopen(./fasttint_macos_i386.dylib, 2): Symbol not found: _PyType_GenericNew Referenced from: /Applications/Games/Demos/CuteKnightKingdom-demo-0.9.25.1-mac/CuteKnightKingdom-demo.app/Contents/Resources/autorun/game/fasttint_macos_i386.dylib Expected in: /Applications/Games/Demos/CuteKnightKingdom-demo-0.9.25.1-mac/CuteKnightKingdomdemo.app/Contents/Resources/autorun/game/fasttint_macos_i386.dylib As best I can tell, _PyType_GenericNew should be defined by Ren'Py's python - why is it trying to find an internal declaration for the symbol instead of the external one?

    Read the article

  • module compiled with swig not found by python

    - by openbas
    Hello, I've a problem with SWIG and python. I've a c-class that compiles correctly, but the python script says it can't find the module. I compile with: swig -c++ -python codes/codes.i g++ -c -Wall -O4 -fPIC -pedantic codes/*.cc g++ -I/usr/include/python2.6 -shared codes/codes_wrap.cxx *.o -o _codes.so This gives me a _codes.so file, as I would expect, but then I have this python file: import sys import codes (rest of the code omitted) It gives me: Traceback (most recent call last): File "script.py", line 3, in <module> import codes ImportError: No module named codes According to http://www.swig.org/Doc1.3/Introduction.html#Introduction_nn8 this is all I should have to do... The files are in the same directory, so the path should not be a problem ?

    Read the article

  • evaluating buffer in emacs python-mode on remote host

    - by Adrian
    Hello, I'm using emacs23 with tramp to modify python scripts on a remote host. I found that when I start the python shell within emacs it starts up python on the remote host. My problem is that when I then try to call python-send-buffer via C-c C-c it comes up with the error Traceback (most recent call last): File "", line 1, in ? ImportError: No module named emacs Traceback (most recent call last): File "", line 1, in ? NameError: name 'emacs' is not defined Now, I must admit that I don't really know what's going on here. Is there a way for me to configure emacs so that I can evaluate the buffer on the remote host? Many thanks.

    Read the article

  • How do I mock a custom field that is deleted so that south migrations run?

    - by muhuk
    I have removed an app that contained a couple of custom fields from my project. Now when I try to run my migrations I get ImportError, naturally. These fields were very basic customizations like below: from django.db.models.fields import IntegerField class SomeField(IntegerField): def get_internal_type(self): return "SomeField" def db_type(self, connectio=None): return 'integer' def clean(self, value): # some custom cleanup pass So, none of them contain any database level customizations. When I removed this code, I've created migrations so the subsequent migration all ran fine. But when I try to run them on a pre-deletion database I realized my mistake. I can re-create a bare-bones app and make these imports work, but Ideally I would like to know if South has a mechanism to resolve these issues? Or is there any best practises? It would be cool if I could solve these issues just by modifying my migrations and not touching the codebase. (Django 1.3, South 0.7.3)

    Read the article

  • Import boto from local library

    - by ensnare
    I'm trying to use boto as a downloaded library, rather than installing it globally on my machine. I'm able to import boto, but when I run boto.connect_dynamodb() I get an error: ImportError: No module named dynamodb.layer2 Here's my file structure: project/ project/ __init__.py libraries/ __init__.py flask/ boto/ views/ .... modules/ __init__.py db.py .... templates/ .... static/ .... runserver.py And the contents of the relevant files as follows: project/project/modules/db.py from project.libraries import boto conn = boto.connect_dynamodb( aws_access_key_id='<YOUR_AWS_KEY_ID>', aws_secret_access_key='<YOUR_AWS_SECRET_KEY>') What am I doing wrong? Thanks in advance.

    Read the article

  • How to import *.pyc file from different version of python?

    - by Almog
    Hello, I used python 2.5 and imported a file named "irit.py" from C:\util\Python25\Lib\site-packages directory. This files imports the file "_irit.pyc which is in the same directory. It worked well and did what I wanted. Than, I tried the same thing with python version 2.6.4. "irit.py" which is in C:\util\Python26\Lib\site-packages was imported, but "_irit.pyc" (which is in the same directory of 26, like before) hasn't been found. I got the error message: File "C:\util\Python26\lib\site-packages\irit.py", line 5, in import _irit ImportError: DLL load failed: The specified module could not be found. Can someone help me understand the problem and how to fix it?? Thanks, Almog.

    Read the article

  • Importing BitTorrent bencode module

    - by bocco
    Hi, I'm on Mac OS X 10.6. Python is 2.6.1. I've installed bencode module as sudo easy_install BitTorrent-bencode It appeared in site-packages /Library/Python/2.6/site-packages/BitTorrent_bencode-5.0.8-py2.6.egg But, how to import and use this module? >>> import bencode doesn't work... Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named bencode How to import modules from site-packages? How to recognize module name BitTorrent_bencode-5.0.8-py2.6.egg contains? Thanks

    Read the article

  • Error with swig: undefined symbol: _ZN7hosters11hostersLink7getLinkEi

    - by Eduardo
    I'm trying to make a python binding for the this library: http://code.google.com/p/hosterslib/. I'm using swig, heres is the code: %module pyhosters %{ include "hosters/hosters.hpp" %} %include "hosters/hosters.hpp" I run "swig -c++ -python -o swig_wrap.cxx swig.i" and I compile with "g++ -O2 -fPIC -shared -o _pyhosters.so swig_wrap.cxx python-config --libs --cflags -lhosters -lcln -lhtmlcxx pkg-config libglog --libs --cflags -I/usr/include/python2.6 -Wall -Wextra" But when I run python and I import it, I get: import pyhosters Traceback (most recent call last): File "", line 1, in File "./pyhosters.py", line 7, in import _pyhosters ImportError: ./_pyhosters.so: undefined symbol: _ZN7hosters11hostersLink7getLinkEi How can I solve that? Thanks.

    Read the article

  • Django and mod_python intermittent error?

    - by Peter
    I have a Django site at http://sm.rutgers.edu/relive/af_api/index/. It is supposed to display "Home of the relive APIs". If you refresh this page many times, you can see different renderings. 1) The expected page. 2) Django "It worked!" page. 3) "ImportError at /index/" page. If you scroll down enough to ROOT_URLCONF part, you will see it says 'relive.urls'. But apparently, it should be 'af_api.urls', which is in my settings.py file. Since these results happen randomly, is it possible that either Django or mod_python is working unstably?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12  | Next Page >