importerror

Can't import Webkit from gi.repository

百般思念 提交于 2019-12-02 23:08:38
When I try to import Webkit from gi.repository , it gives an ImportError : from gi.repository import Webkit ERROR:root:Could not find any typelib for Webkit Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name Webkit What am I doing wrong? Your error seems a typo and the library is not found for that. You have to put "WebKit" instead of "Webkit". Additionaly if you use Ubuntu check the library existence with: $ locate girepository | grep WebKit /usr/lib/girepository-1.0/WebKit-3.0.typelib If doesn't exist you need install the package gir1.2

Python: py2app “ImportError: dlopen(): Library not loaded”

柔情痞子 提交于 2019-12-02 22:13:34
问题 I've written a python script that does some work with numpy and scikit's audiolab. I want to create a standalone app using py2app but I keep getting the same error no matter which OS X computer I test it on. ImportError: dlopen(/Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy/linalg/lapack_lite.so, 2): Library not loaded: @rpath/libmkl_intel_lp64.dylib Referenced from: /Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy

from Gui import * in python 3?

浪子不回头ぞ 提交于 2019-12-02 20:39:57
问题 I'm trying this: import os, sys from Gui import * import Image as PIL import ImageTk class ImageBrowser(Gui): def __init__(self): Gui.__init__(self) self.button = self.bu(command=self.quit, relief=FLAT) def image_loop(self, dirname='.'): files = os.listdir(dirname) for file in files: try: self.show_image(file) print (file) self.mainloop() except IOError: continue except: break def show_image(self, filename): image = PIL.open(filename) self.tkpi = ImageTk.PhotoImage(image) self.button.config

ImportError: cannot import name get_column_letter

♀尐吖头ヾ 提交于 2019-12-02 19:03:32
I am able to use openpyxl as an import in my code. But when I try to do the following: from openpyxl.cell import get_column_letter I get the following error: ImportError: cannot import name get_column_letter I am using python 2.7. I have installed it using easy_install . Tried searching for this issue but couldn't find anything related to it. The function get_column_letter has been relocated in Openpyxl version 2.4 from openpyxl.cell to openpyxl.utils . The current import is: from openpyxl.utils import get_column_letter If you want to do not know which version the end-user has, you can use the

Python: ImportError no module named urllib

早过忘川 提交于 2019-12-02 18:45:54
问题 I just rented a VPS from Linode which has python2.5 and ubuntu 8.04. When I run this command from python shell: import urllib I get: ImportError: No module named urllib What can be the reason? How can I add this module to python? Isn't it prepackaged with the basic version? Can it be PYTHONPATH problem? 回答1: Ok, I resolved the issue. Somehow, python-tk package (which includes urllib) was missing. So the following line fixed the problem apt-get install python-tk 回答2: I use a later OS, so I don

Django, ImportError: cannot import name Celery, possible circular import?

半世苍凉 提交于 2019-12-02 17:53:34
I went through this example here: http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html All my tasks are in files called tasks.py. After updating celery and adding the file from the example django is throwing the following error, no matter what I try: ImportError: cannot import name Celery Is the problem possibly caused by the following? app.autodiscover_tasks(settings.INSTALLED_APPS, related_name='tasks') Because it goes through all tasks.py files which all have the following import. from cloud.celery import app cloud/celery.py : from __future__ import absolute_import

Python ImportError: No module sleep found

僤鯓⒐⒋嵵緔 提交于 2019-12-02 14:54:48
问题 Need help help, just learning Python, following Raspberry project. Have this, as root in /etc/init.d: #! /bin/bash modprobe snd_bcm2835 amixer cset numid=3 1 python /home/pi/radio.py #!/usr/bin env python import time import sleep import os import RPi.GPIO as GPIO # I found loads of BBC Radio streams from http://bbcstreams.com/ GPIO.setmode(GPIO.BCM) GPIO.setup(23 , GPIO.IN) GPIO.setup(24 , GPIO.IN) while True: if GPIO.input(23)==1: os.system(‘sudo killall mplayer’) os.system(‘mplayer

Running into ImportError with sklearn while doing tutorial

两盒软妹~` 提交于 2019-12-02 13:16:45
问题 Hi I'm trying to follow the machine learning 101 tutorial provided by sklearn, and I keep running into an error. I have the most the sklearn version downloaded from here: https://github.com/scikit-learn/scikit-learn I run Windows python: 2.7.5 (32bit) scipy: .12 numpy: 1.7.0 When I run from sklearn.linear_model import LinearRegression model = LinearRegression() I get --------------------------------------------------------------------------- ImportError Traceback (most recent call last)

Python ImportError: No module sleep found

☆樱花仙子☆ 提交于 2019-12-02 10:45:22
Need help help, just learning Python, following Raspberry project. Have this, as root in /etc/init.d: #! /bin/bash modprobe snd_bcm2835 amixer cset numid=3 1 python /home/pi/radio.py #!/usr/bin env python import time import sleep import os import RPi.GPIO as GPIO # I found loads of BBC Radio streams from http://bbcstreams.com/ GPIO.setmode(GPIO.BCM) GPIO.setup(23 , GPIO.IN) GPIO.setup(24 , GPIO.IN) while True: if GPIO.input(23)==1: os.system(‘sudo killall mplayer’) os.system(‘mplayer -playlist http://bbc.co.uk/radio/listen/live/r1.asx &’) if GPIO.input(24)==1: os.system(‘sudo killall mplayer’)

Python: ImportError no module named urllib

馋奶兔 提交于 2019-12-02 10:34:49
I just rented a VPS from Linode which has python2.5 and ubuntu 8.04. When I run this command from python shell: import urllib I get: ImportError: No module named urllib What can be the reason? How can I add this module to python? Isn't it prepackaged with the basic version? Can it be PYTHONPATH problem? Ok, I resolved the issue. Somehow, python-tk package (which includes urllib) was missing. So the following line fixed the problem apt-get install python-tk I use a later OS, so I don't know if this will help, but just in case: marcelo@localhost:~$ lsb_release -a No LSB modules are available.