importerror

PyQt 4.7 - ImportError after installing on Windows

心已入冬 提交于 2019-11-30 16:50:15
问题 I've been trying to install PyQt 4.7 on Vista, but I am getting an ImportError when I try to do: from PyQt4 import QtCore, QtGui . ImportError: DLL load failed: The specified module could not be found. I've checked my System Path, and C:\Python31\Lib\site-packages\PyQt4\bin is on there. I can't run any of the examples, but the Designer, Assistant and Linguist run fine. I am using ActivePython 3.1, if that makes any difference. And I haven't had any previous version of PyQt installed. Edit: I

Receiving Import Error: No Module named ***, but has __init__.py

一曲冷凌霜 提交于 2019-11-30 16:49:56
问题 I understand that this question has been asked several times but after reading them, and making the suggested fixes, I'm still stumped. My project structure is as follows: Project | src | root - has __init__.py | nested - has __init__.py | tests - has __init__.py | utilities - has __init__.py | services - has __init__.py I've successfully run a unittest regression class from Eclipse without any issues. As soon as I attempted to run the same class from the command-line (as other users who will

Could not import 'oauth2_provider.ext.rest_framework.OAuth2Authentication' for API setting 'DEFAULT_AUTHENTICATION_CLASSES'

ぐ巨炮叔叔 提交于 2019-11-30 16:36:58
问题 It's the first time I work with django rest and Django Oauth toolkit I'm following this tutorial oauth2-with-django-rest-framework But when I run python manage.py migrate I get the following error: ImportError: Could not import 'oauth2_provider.ext.rest_framework.OAuth2Authentication' for API setting 'DEFAULT_AUTHENTICATION_CLASSES'. ImportError: No module named ext.rest_framework. What is going wrong ? is there another module I should install ? my virtual environment contains : certifi==2017

Create-React-App failed to compile | Import/First Error

懵懂的女人 提交于 2019-11-30 13:53:45
I'm currently using Create-React-App for my personal site. I keep getting the following errors every time I run it: ./src/~/react-router-dom/es/index.js Line 3: Import in body of module; reorder to top import/first Line 5: Import in body of module; reorder to top import/first Line 7: Import in body of module; reorder to top import/first Line 9: Import in body of module; reorder to top import/first Line 11: Import in body of module; reorder to top import/first Line 13: Import in body of module; reorder to top import/first Line 15: Import in body of module; reorder to top import/first Line 17:

ImportError: No module named django.core.management when using manage.py

那年仲夏 提交于 2019-11-30 11:53:04
问题 I'm trying to run python manage.py runserver on a Django application I have and I get this error: Traceback (most recent call last): File "manage.py", line 8, in <module> from django.core.management import execute_from_command_line ImportError: No module named django.core.management Here is the output of pip freeze | grep -i django to show I do in fact have Django installed: Django==1.6.5 django-cached-authentication-middleware==0.2.0 django-cors-headers==1.1.0 django-htmlmin==0.7.0 django

Cannot install PyPdf 2 module

无人久伴 提交于 2019-11-30 11:41:41
Trying to install PyPdf2 module, I downloaded the zip and unzipped it, I executed python setup.py build and python setup.py install , but it seems that it has not been installed , when I try to import it from a python script, it returns an ImportError : import pyPdf Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pyPdf Any help please. I'm using python 2.7 under windows XP. It appears the README file for PyPDF2 is incorrect. It suggests that import pyPdf should work, but it doesn't. This new module is imported as import PyPDF2 (as suggested

Sublime Text2 Import error: No module named Gnuplot

我的未来我决定 提交于 2019-11-30 09:02:21
问题 I'm trying to use Gnuplot in a Python script I'm writing in Sublime Text. Whenever I build, I get the error message Traceback (most recent call last): File "..." line 4, in <module> import Gnuplot ImportError: No module named Gnuplot If I do the exact same code lines directly in Terminal, I have no problem importing and using Gnuplot. The import error seems to be common, just with other modules. Usually the fix is related to PYTHONPATH. However, Gnuplot is on my computer located in /Library

Absolute imports in python not working, relative imports work

≡放荡痞女 提交于 2019-11-30 08:31:23
问题 I can't seem to get absolute imports to work in python. Here is my file structure: a/ b/ __init__.py __init__.py foo.py foo.py: # Including or removing the __future__ import has no effect from __future__ import absolute_import from a import b # just `import b` works fine print "success!" I instead get: ImportError: No module named a What in the world is going on here? I feel like I'm missing something basic. While this example is trivial, I need absolute imports to work for the real project,

Importing python modules in jython

你说的曾经没有我的故事 提交于 2019-11-30 07:10:40
问题 I'm having some issues importing scapy under jython. I've been doing java forever, but python for only a day or two. The simple case to reproduce the problem is: $jython >>> import sys >>> sys.path ['', '/usr/share/jython/Lib', '/usr/lib/site-python', '__classpath__'] >>> from scapy.all import * Traceback (innermost last): File "<console>", line 1, in ? ImportError: no module named scapy If I do these exact same steps under python , everything works. How do I tell jython to use scapy? If it

What does “Symbol not found / Expected in: flat namespace” actually mean?

一笑奈何 提交于 2019-11-30 05:54:57
When I import a module I built, I get this boost-python related error: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: dlopen(./myMod.so, 2): Symbol not found: __ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E Referenced from: ./myMod.so Expected in: flat namespace in ./myMod.so What does this actually mean? Why was this error raised? Description The problem was caused by mixing objects that compiled with libc++ and object that compiled with libstdc++ . In our case, the library myMod.so (compiled with